Datasets:
RoboParty Release commited on
Commit ·
8ca7ba0
1
Parent(s): bb6c81d
Publish main branch public docs and unsplit bundles
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- README.md +18 -0
- bundles/README_PARTS.md +14 -0
- bundles/converted_public.tar.zst +3 -0
- bundles/converted_public.tar.zst.sha256 +3 -0
- bundles/gso_derived_public.tar.zst +3 -0
- bundles/gso_derived_public.tar.zst.sha256 +3 -0
- bundles/gso_original.tar.zst +3 -0
- bundles/gso_original.tar.zst.sha256 +3 -0
- bundles/hssd_metadata_fixed.tar.zst +3 -0
- bundles/hssd_metadata_fixed.tar.zst.sha256 +3 -0
- bundles/hssd_original_variants.tar.zst +3 -0
- bundles/hssd_original_variants.tar.zst.sha256 +3 -0
- bundles/lightwheel_original.tar.zst +3 -0
- bundles/lightwheel_original.tar.zst.sha256 +3 -0
- bundles/molmospaces_extracted.tar.zst +3 -0
- bundles/molmospaces_extracted.tar.zst.sha256 +3 -0
- bundles/polyhaven_original.tar.zst +3 -0
- bundles/polyhaven_original.tar.zst.sha256 +3 -0
- bundles/replicacad_original.tar.zst +3 -0
- bundles/replicacad_original.tar.zst.sha256 +3 -0
- docs/reproduction/asset_release_plan/hf_upload_manifest.tsv +17 -0
- docs/reproduction/asset_release_plan/主分支资产类别与论文数字对照_20261121.md +147 -0
- docs/reproduction/asset_release_plan/资产开源与复现准备_主分支_20261121.html +80 -0
- docs/reproduction/asset_release_plan/资产开源与复现准备_主分支_20261121.md +290 -0
- docs/reproduction/cases20_floorplans/README.md +74 -0
- docs/reproduction/cases20_floorplans/cases20_public.json +1751 -0
- docs/reproduction/cases20_floorplans/rebuild_cases20_floorplans.py +418 -0
- docs/reproduction/cases20_floorplans/recipes_cases20.json +1528 -0
- docs/reproduction/public_conversion_code/README.md +391 -0
- docs/reproduction/public_conversion_code/configs/assets/front_axis_overrides_v1.json +42 -0
- docs/reproduction/public_conversion_code/docs/asset-bundle-setup.md +84 -0
- docs/reproduction/public_conversion_code/docs/official-mdl-pipeline.md +270 -0
- docs/reproduction/public_conversion_code/packages/__init__.py +1 -0
- docs/reproduction/public_conversion_code/packages/adapters/__init__.py +31 -0
- docs/reproduction/public_conversion_code/packages/adapters/arena.py +24 -0
- docs/reproduction/public_conversion_code/packages/adapters/embodiedgen.py +105 -0
- docs/reproduction/public_conversion_code/packages/adapters/protocols.py +24 -0
- docs/reproduction/public_conversion_code/packages/adapters/rp1.py +59 -0
- docs/reproduction/public_conversion_code/packages/adapters/rparena.py +823 -0
- docs/reproduction/public_conversion_code/packages/adapters/rparena_baked.py +118 -0
- docs/reproduction/public_conversion_code/packages/adapters/rparena_native.py +150 -0
- docs/reproduction/public_conversion_code/packages/adapters/rparena_usd_worker.py +114 -0
- docs/reproduction/public_conversion_code/packages/adapters/rparena_v16.py +945 -0
- docs/reproduction/public_conversion_code/packages/adapters/sam3d.py +200 -0
- docs/reproduction/public_conversion_code/packages/adapters/scenesmith.py +366 -0
- docs/reproduction/public_conversion_code/packages/adapters/source_device.py +31 -0
- docs/reproduction/public_conversion_code/packages/adapters/texture_compression.py +203 -0
- docs/reproduction/public_conversion_code/packages/adapters/texture_metrics.py +68 -0
- docs/reproduction/public_conversion_code/packages/asset_registry/__init__.py +21 -0
- docs/reproduction/public_conversion_code/packages/asset_registry/admission.py +304 -0
README.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# RoboHomeGen Public Asset Bundles
|
| 2 |
+
|
| 3 |
+
This repository is the public RoboParty release of redistributable RoboHomeGen asset bundles and provenance.
|
| 4 |
+
|
| 5 |
+
Large sources are delivered as `bundles/*.tar.zst` to keep the Git repository below file-count and single-commit limits. Each bundle has a `.sha256` sidecar. Extract a bundle into an empty directory and preserve the archive's top-level dataset directory.
|
| 6 |
+
|
| 7 |
+
Included bundles are HSSD, ArtVIP, ReplicaCAD, Lightwheel, GSO, Poly Haven/YCB converted assets, HSSD public repair outputs, and the allowed MolmoSpaces extraction. `docs/reproduction/` contains download receipts, conversion code, RPLAN rebuild recipes, and release scope.
|
| 8 |
+
|
| 9 |
+
The public release excludes InteriorAgent geometry and derived geometry, commercial interior Blender materials, kitchen upload materials of unclear provenance, Poliigon, PG Skies, NVIDIA MDL copies, and complete scenes whose embedded geometry or external materials are restricted. Those require independent downloads or internal access.
|
| 10 |
+
|
| 11 |
+
Verify an archive before extraction:
|
| 12 |
+
|
| 13 |
+
```bash
|
| 14 |
+
sha256sum -c bundles/<bundle>.tar.zst.sha256
|
| 15 |
+
tar --zstd -xf bundles/<bundle>.tar.zst
|
| 16 |
+
```
|
| 17 |
+
|
| 18 |
+
The bundles are source/derived archives, not a replacement for the full main-branch runtime. Reproduction also needs the project code, indexes, runtime environment, and the source-specific licenses.
|
bundles/README_PARTS.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Split bundle files
|
| 2 |
+
|
| 3 |
+
Three large archives are stored as 512 MiB parts so that downloads can run in parallel and remain below Hub single-file limits. Reassemble each archive in lexical order, then verify the resulting archive with its `.parts.sha256` manifest.
|
| 4 |
+
|
| 5 |
+
```bash
|
| 6 |
+
cat bundles/hssd_derived_public.tar.zst.part-* > hssd_derived_public.tar.zst
|
| 7 |
+
sha256sum hssd_derived_public.tar.zst
|
| 8 |
+
cat bundles/hssd_original.tar.zst.part-* > hssd_original.tar.zst
|
| 9 |
+
sha256sum hssd_original.tar.zst
|
| 10 |
+
cat bundles/artvip_original.tar.zst.part-* > artvip_original.tar.zst
|
| 11 |
+
sha256sum artvip_original.tar.zst
|
| 12 |
+
```
|
| 13 |
+
|
| 14 |
+
The first line in each `.parts.sha256` file is the expected SHA-256 for the reconstructed archive. The later lines contain the per-part hashes.
|
bundles/converted_public.tar.zst
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7e018622fb958ee98b13364e0892944d618b81a53a68f861ccd0ccf3028003f2
|
| 3 |
+
size 10757089
|
bundles/converted_public.tar.zst.sha256
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:902cc5e325f7c4128deb27be787f137943be6fd53c1bb83cf11e0673e8d9d644
|
| 3 |
+
size 142
|
bundles/gso_derived_public.tar.zst
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a7c6f37cb7159b930647cef61f611b65fbb82dc36dc73eff209064f57c6ee273
|
| 3 |
+
size 11453865
|
bundles/gso_derived_public.tar.zst.sha256
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1b0205e8adac0b1e452b584c58adf6385098c50d882f539a92dfb4070697066b
|
| 3 |
+
size 144
|
bundles/gso_original.tar.zst
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:eeb6cb3cdc87b9f647e406f11e217fe4fb66242978bf8958e8b950fa5e5540df
|
| 3 |
+
size 11451772
|
bundles/gso_original.tar.zst.sha256
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ad6f445f9e4bd56a6edf6516c54364516efb8a4bb6c8e9d8eaf1c44c91ca50ae
|
| 3 |
+
size 138
|
bundles/hssd_metadata_fixed.tar.zst
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4248294578329e6bc97216c4fc782321f1d2e7032ec708ab608de9b88d52927d
|
| 3 |
+
size 546208773
|
bundles/hssd_metadata_fixed.tar.zst.sha256
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5c17423492e17f5f618dd823f940e901f9e67d6d3dbf55fade9619c473f4b502
|
| 3 |
+
size 145
|
bundles/hssd_original_variants.tar.zst
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:52c04ad61a8852f7d6cdb2cc5c7beabba0e50a2ec964454ff9e2326a9f67f2b7
|
| 3 |
+
size 300862512
|
bundles/hssd_original_variants.tar.zst.sha256
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d41d7f7c9678f3e10230fee87c28db825aa5b3c0874f66a927aecbfb047ebde9
|
| 3 |
+
size 148
|
bundles/lightwheel_original.tar.zst
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5187a073a6a515b76b2a4dc6b5bc30f2ba60f9b27667ecbb58783f18a65db8d4
|
| 3 |
+
size 236439581
|
bundles/lightwheel_original.tar.zst.sha256
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:095d2025fd6d06d52c2f8e2719738c9ab9c8603a687a3f430a86b264f2ce2126
|
| 3 |
+
size 145
|
bundles/molmospaces_extracted.tar.zst
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2af763aedc69ad5bad2f3f0da7b91c3de07cab304e5bc2329e32149646055184
|
| 3 |
+
size 831422559
|
bundles/molmospaces_extracted.tar.zst.sha256
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7079c1156781f5aeb0d393719e1c8d340c82b5844467dffe24326a59b269db7d
|
| 3 |
+
size 147
|
bundles/polyhaven_original.tar.zst
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b1c2532d2766aa6ca57f952a617cbdfc73aa9cfd0a43786715a5d13d8d31f799
|
| 3 |
+
size 18491217
|
bundles/polyhaven_original.tar.zst.sha256
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1b52e15e2540f9d9d74325ad87c1eaa5b39e8d7cccf2287d4a832046b0104d97
|
| 3 |
+
size 144
|
bundles/replicacad_original.tar.zst
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2dc4f25c2a068527ab32f5ec29d3d6062c32eb0b890525a9a625973edcdc7144
|
| 3 |
+
size 11420075
|
bundles/replicacad_original.tar.zst.sha256
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:616b1d2ed458b19f11207f6e4ccc8826ec902153d77408ec42f7b88e25066a99
|
| 3 |
+
size 145
|
docs/reproduction/asset_release_plan/hf_upload_manifest.tsv
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class bundle_id repository content canonical_source format conversion_or_materialization license_or_access action status
|
| 2 |
+
code main-code ORG/robohomegen candidate19 code, runner, adapter, score scripts, release docs local rphome_scripts + RP-RoboHavenGen Python/JSON/MD remove caches, logs, backups, secrets; preserve source hashes project-owned GitHub + HF metadata prepared
|
| 3 |
+
index main-retrieval-index ORG/robohomegen-assets-private full_matrix_reviewed_compatibility.sqlite3; annotation_index.sqlite3; prepared pool indexes H200-1 scene_evidence_repair_20261103; current_vs_v31_20261031 SQLite copy bytes; emit sha256 and SQLite schema report project-owned, paths may reference restricted sources HF private manifest required
|
| 4 |
+
metadata main-annotation-release ORG/robohomegen-assets-private records.jsonl, front audit, furniture usability, style attributes, provenance H200-1/NAS zhf annotation trees JSONL/JSON/CSV no geometry conversion; normalize paths in sidecar only project-owned; may contain third-party identifiers HF private license review required
|
| 5 |
+
inputs cases20-rebuild ORG/robohomegen-reproduction cases20_public.json, recipes_cases20.json, rebuild script local release_prep/cases20_floorplans JSON/Python publish identifiers and recipes; rebuild RPLAN-derived geometry locally; do not include rooms.json RPLAN/Graph2Plan non-redistribution HF public metadata + source download ready
|
| 6 |
+
public-assets hssd ORG/robohomegen-public-assets HSSD original download receipt, selected public files, repaired-file manifest H200-2 public_assets_20261115; NAS public source GLB/URDF/JSON BasisU decode/repair only in derived namespace; keep original immutable HSSD CC BY-NC 4.0; verify terms HF public if allowed; repaired subset only license check
|
| 7 |
+
public-assets artvip ORG/robohomegen-public-assets ArtVIP source and conversion receipts H20-96-2 public_assets_20261115 USD/texture/JSON preserve USD relative references; no flattening ArtVIP repository terms HF public if license permits license check
|
| 8 |
+
public-assets interioragent ORG/robohomegen-public-assets download receipt and non-restricted metadata only H20-96-3 public_assets_20261115 USD/texture/JSON preserve Materials/Textures/Meshes tree; do not upload geometry without redistribution permission InteriorAgent terms prohibit redistribution HF metadata only; private internal copy blocked by license
|
| 9 |
+
public-assets molmospaces ORG/robohomegen-public-assets download receipt, unpack script, metadata and allowed derived files H20-96-1 public_assets_20261115 USD/USDA/TAR/JSON unpack tar/zst into canonical tree; preserve archive member map ODC-By/CC BY; verify exact dataset terms HF public if license permits license check
|
| 10 |
+
public-assets replicacad ORG/robohomegen-public-assets ReplicaCAD download receipt and converted metadata H20-96-4 public_assets_20261115 GLB/URDF/JSON no geometry conversion beyond source package format ReplicaCAD terms HF public if license permits prepared
|
| 11 |
+
public-assets gso-ycb-polyhaven ORG/robohomegen-public-assets download receipts, source archives, converted USD and manifests H20-96-4/H200-1 public_assets_20261115 ZIP/GLB/USD/HDR/JSON GSO/Poly Haven canonical preprocessing; YCB author conversion; keep raw and derived namespaces per-dataset licenses HF public if allowed license check
|
| 12 |
+
public-assets lightwheel ORG/robohomegen-public-assets download receipt, 378-file MD5 index, unpacked USD H200-1 public_assets_20261115 USD/JSON ZIP extraction only; source USD unchanged Lightwheel CC BY-NC 4.0 HF public if allowed license check
|
| 13 |
+
derived main-repaired-assets ORG/robohomegen-assets-private HSSD repaired GLB, Molmo extracted USD, USD path repairs, prepared indexes NAS zhf/rhg_asset_audit_20261013_v1 and rhg_asset_repair_20261013_v2 GLB/USD/JSON/SQLite BasisU decode, archive extraction, absolute-to-release path repair; every derived file gets source hash and recipe project-derived; underlying licenses apply HF private needs provenance bundle
|
| 14 |
+
materials mdl-offline ORG/robohomegen-assets-private material acceptance indexes, prepared libraries, bake cache, normal_dx_to_gl NAS zhf/rhg_style_joint_20261013; H200-1 caches BLEND/EXR/PNG/JSON MDL compile/distill/bake; DX-to-GL normal conversion; native graphs preserved mixed; NVIDIA/InteriorAgent restrictions HF private only where permitted; otherwise internal download recipe license split
|
| 15 |
+
nonpublic main-scenes ORG/robohomegen-scenes-private 55 candidate19 scene packages and manifests H20-96-1 candidate19_replay_20261115_1647 BLEND/JSON no scene-format conversion; materialize external dependencies or ship dependency manifest contains restricted geometry/materials HF private only after rights review prepare private mirror
|
| 16 |
+
links main-link-map ORG/robohomegen-assets-private all project symlink records with target hashes and target class H200-1 nas_mirror and asset_library JSONL materialize project-owned targets; retain original link path in symlinks.jsonl; never upload dangling links alone project-owned or third-party dependent HF private manifest prepared
|
| 17 |
+
restricted commercial-materials ORG/robohomegen-internal interior Blender materials, kitchen PBR, Poliigon, PG Skies, NVIDIA MDL copies NAS zhf/rp_robohavengen and rhg_style_joint_20261013 BLEND/MDL/HDR/TEXTURE no conversion for archive; public replacement would require new validation commercial / restricted internal private storage; no public HF blocked
|
docs/reproduction/asset_release_plan/主分支资产类别与论文数字对照_20261121.md
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 主分支资产类别与论文数字对照
|
| 2 |
+
|
| 3 |
+
核对日期:2026-11-21。对照对象:
|
| 4 |
+
|
| 5 |
+
- 已提交正文 / `CVPR2027/RoboHome_tasks_restored_8page_under50MB.pdf`
|
| 6 |
+
- 待提交附录 / `CVPR2027/RoboHome_supplementary.pdf`
|
| 7 |
+
- 主分支检索库:H200-1 `/data/tutu/robohomegen/scene_evidence_repair_20261103/full_matrix_reviewed_compatibility.sqlite3`
|
| 8 |
+
|
| 9 |
+
## 结论
|
| 10 |
+
|
| 11 |
+
论文与索引数字**不是同一层级,不能直接逐项相等比较**:
|
| 12 |
+
|
| 13 |
+
| 论文 / 实际数字 | 数量 | 口径 |
|
| 14 |
+
|---|---:|---|
|
| 15 |
+
| 论文:Multi-source assets | 120K+ | 原始多源资产库 / 数据集规模,论文附录 Table S3 的构建漏斗入口 |
|
| 16 |
+
| 论文:Materials | 3,728 | 室内 Blender 材质库条目;与索引中的 `interior_blender_20261009` 3,728 条一致 |
|
| 17 |
+
| 论文:Usable models after repair and pre-screening | 23,221 | 修复和预筛后的模型漏斗中间层,不是当前 SQLite 的全部 descriptor 行 |
|
| 18 |
+
| 论文:Runtime-qualified assets | 19,795 | 运行时资格门之后的资产集,不是当前 SQLite 的全部 descriptor 行 |
|
| 19 |
+
| 主分支 SQLite:`asset_descriptors` | **37,279** | 主分支检索描述条目,含对象、材质、片段、房间/整场景、灯光等混合类型 |
|
| 20 |
+
| 主分支 SQLite:唯一 `asset_id` | **37,279** | 当前表中每个 asset_id 一行;不等于 37,279 个可下载几何文件 |
|
| 21 |
+
| 主分支外部物理闭包 | **约 324 GiB** | 原件、修复件、索引/缓存、主分支场景的磁盘闭包,不是论文资产数量 |
|
| 22 |
+
|
| 23 |
+
因此:**120K+ 是原始资产来源规模,23,221/19,795 是构建漏斗数字,37,279 是主分支兼容性检索索引,324 GiB 是磁盘占用。** 这四个数字不应放在同一列互相替代。
|
| 24 |
+
|
| 25 |
+
当前附录 PDF 的来源文字只列 HSSD、Objaverse 1.0、ArtVIP、ReplicaCAD、YCB 和 3,728 materials;项目实际主分支 SQLite 还包含 InteriorAgent、MolmoSpaces、Lightwheel、Poly Haven、GSO、ambientCG 等来源。若附录要解释主分支检索库,应补一句“the compatibility index contains additional derived and auxiliary sources”并给出完整 source table。
|
| 26 |
+
|
| 27 |
+
## 来源分布:37,279 条 descriptor
|
| 28 |
+
|
| 29 |
+
| `asset_descriptors.source` | 条目 |
|
| 30 |
+
|---|---:|
|
| 31 |
+
| HSSD | 18,228 |
|
| 32 |
+
| InteriorAgent | 6,174 |
|
| 33 |
+
| molmospaces | 5,841 |
|
| 34 |
+
| interior_blender_20261009 | 3,728 |
|
| 35 |
+
| ArtVIP | 2,152 |
|
| 36 |
+
| MolmoSpaces | 502 |
|
| 37 |
+
| Lightwheel SimReady | 378 |
|
| 38 |
+
| ReplicaCAD | 185 |
|
| 39 |
+
| Poly Haven | 45 |
|
| 40 |
+
| GoogleResearch on Gazebo Fuel | 24 |
|
| 41 |
+
| ambientCG | 17 |
|
| 42 |
+
| 空值/其他 | 5 |
|
| 43 |
+
| **合计** | **37,279** |
|
| 44 |
+
|
| 45 |
+
大小方面,主分支逻辑闭包约 **324 GiB**:公开原件 43.4 GiB、受限原件 45.1 GiB、项目衍生件 131.5 GiB、索引/标注/缓存 42.9 GiB、主分支运行目录 61.4 GiB。这里的 43.4 GiB 是资产原件分类总量,不是 37,279 条 descriptor 的逐条文件大小之和;修复件、重复副本和缓存必须单独计量。
|
| 46 |
+
|
| 47 |
+
## 类别分布:主分支检索索引
|
| 48 |
+
|
| 49 |
+
下面是 `asset_descriptors.category` 的原始类别计数。类别是检索/资格标签,不是把每个条目都视为独立最终家具实例。
|
| 50 |
+
|
| 51 |
+
### 家具与大件
|
| 52 |
+
|
| 53 |
+
| 类别 | 条目 | 主要含义 |
|
| 54 |
+
|---|---:|---|
|
| 55 |
+
| cabinet | 1,578 | 柜体、通用柜 |
|
| 56 |
+
| shelf | 1,511 | 架子/搁板 |
|
| 57 |
+
| bed | 572 | 床 |
|
| 58 |
+
| armchair | 568 | 扶手椅 |
|
| 59 |
+
| sofa | 533 | 沙发 |
|
| 60 |
+
| desk | 464 | 书桌/工作桌 |
|
| 61 |
+
| stool | 433 | 凳子 |
|
| 62 |
+
| wardrobe | 403 | 衣柜 |
|
| 63 |
+
| mirror | 364 | 镜子 |
|
| 64 |
+
| dresser | 362 | 斗柜 |
|
| 65 |
+
| table | 343 | 通用桌 |
|
| 66 |
+
| coffee_table | 289 | 茶几 |
|
| 67 |
+
| bookcase | 271 | 书柜 |
|
| 68 |
+
| dining_table | 240 | 餐桌 |
|
| 69 |
+
| dining_chair | 233 | 餐椅 |
|
| 70 |
+
| chair | 219 | 通用椅 |
|
| 71 |
+
| kitchen_counter | 186 | 厨房台面/柜体 |
|
| 72 |
+
| toilet | 162 | 马桶 |
|
| 73 |
+
| bench | 155 | 长凳 |
|
| 74 |
+
| desk_chair | 143 | 工作椅 |
|
| 75 |
+
| planter | 142 | 花盆 |
|
| 76 |
+
| kitchen_sink | 125 | 厨房水槽 |
|
| 77 |
+
| oven | 124 | 烤箱/炉具类别 |
|
| 78 |
+
| shower | 100 | 淋浴 |
|
| 79 |
+
| bathtub | 91 | 浴缸 |
|
| 80 |
+
|
| 81 |
+
### 家电与冰箱
|
| 82 |
+
|
| 83 |
+
主分支索引中 `category=refrigerator` 有 **308 条 descriptor**;这 308 条的 `asset_id` 和 `canonical_path` 当前都是一对一,因此在索引口径下也是 308 个唯一来源路径条目。它们不是 308 个已经同时摆入论文场景的实例。按来源分布如下:
|
| 84 |
+
|
| 85 |
+
| 来源 | refrigerator 条目 | 备注 |
|
| 86 |
+
|---|---:|---|
|
| 87 |
+
| HSSD | 97 | GLB/URDF 及 HSSD 修复路径 |
|
| 88 |
+
| molmospaces | 90 | 原始/派生命名空间,常见 `thor_Fridge_*` |
|
| 89 |
+
| ArtVIP | 51 | USD/ArtVIP articulated 资产及组件型记录 |
|
| 90 |
+
| MolmoSpaces | 30 | 归档或解包后的另一种 source 标记;与小写 `molmospaces` 不是简单相加的唯一模型数 |
|
| 91 |
+
| Lightwheel SimReady | 26 | `Refrigerator031`–`Refrigerator057` 等 USD/修复 USD |
|
| 92 |
+
| InteriorAgent | 10 | `kujiale_*/Meshes/fridge_0000.usd` |
|
| 93 |
+
| ReplicaCAD | 4 | ReplicaCAD fridge 资产 |
|
| 94 |
+
| **索引行合计** | **308** | 也是 308 个唯一 `asset_id` / `canonical_path`,但不是场景实例数 |
|
| 95 |
+
|
| 96 |
+
冰箱的可复现来源路径示例:
|
| 97 |
+
|
| 98 |
+
```text
|
| 99 |
+
HSSD -> assets/high_quality/hssd-hab/{objects,urdf}/...
|
| 100 |
+
InteriorAgent -> assets/high_quality/InteriorAgent/kujiale_*/Meshes/fridge_0000.usd
|
| 101 |
+
MolmoSpaces -> repairs/molmo_extracted/<hash>/Fridge_*/<part>.usda
|
| 102 |
+
Lightwheel -> repairs/usd_dependency_paths/<hash>.usdc
|
| 103 |
+
ArtVIP -> ArtVIP/<relative USD path>
|
| 104 |
+
ReplicaCAD -> ReplicaCAD/{glb,urdf}/...
|
| 105 |
+
```
|
| 106 |
+
|
| 107 |
+
### 桌、椅、灯、楼梯和其他场景物件
|
| 108 |
+
|
| 109 |
+
| 族 | 主要类别 | 计数 |
|
| 110 |
+
|---|---|---:|
|
| 111 |
+
| 桌类 | `table` 343、`side_table` 700、`coffee_table` 289、`dining_table` 240、`console_table` 29、`bar_table` 8、`vanity_table` 12、`mobile_worktable` 2、`changing_table` 1 | **约 1,624**(不含 `table_lamp`) |
|
| 112 |
+
| 椅类 | `armchair` 568、`chair` 219、`dining_chair` 233、`desk_chair` 143,另有 lounge/wheelchair 等 | **1,165**(包含细分类别) |
|
| 113 |
+
| 灯具 | `ceiling_light` 656、`table_lamp` 304、`floor_lamp` 277、`wall_light` 134、`light` 21、`lamp` 14 | **1,406**(灯光相关类别) |
|
| 114 |
+
| 植物 | `plant` 719、`planter` 142 | **861** |
|
| 115 |
+
| 楼梯 | `stair` | **32** HSSD 条目;另有 1 条 Poly Haven 名称中含 stair 的记录 |
|
| 116 |
+
| 卫浴 | `toilet` 162、`bathroom_sink` 363、`kitchen_sink` 125、`shower` 100、`bathtub` 91 | 类别可重叠于功能契约,不应简单视为可互换资产 |
|
| 117 |
+
| 厨房 | `kitchen_counter` 186、`oven` 124、`cooktop` 41、`range_hood` 81、`dishwasher` 12、`microwave` 103 | 还包含从来源描述归一化到 `small_appliance` 的条目 |
|
| 118 |
+
|
| 119 |
+
`table`/`chair`/`lamp` 等是类别族统计,不是论文中“一个场景里实际摆了多少张桌子/椅子”。论文的 120K+、23,221、19,795 也不是这些细分类别之和。
|
| 120 |
+
|
| 121 |
+
## 与当前正文/附录的对照结论
|
| 122 |
+
|
| 123 |
+
| 论文写法 | 与实际是否一致 | 说明 |
|
| 124 |
+
|---|---|---|
|
| 125 |
+
| 120K+ multi-source assets | **口径可成立** | 应解释为原始多源资产库规模,而不是当前 compatibility SQLite 的行数 |
|
| 126 |
+
| 3,728 materials | **一致** | 对应 `interior_blender_20261009` 材质条目 |
|
| 127 |
+
| 23,221 usable models | **需注明阶段** | 是修复/预筛漏斗中间层,不是 37,279 descriptor 数 |
|
| 128 |
+
| 19,795 runtime-qualified assets | **需注明阶段** | 是运行时资格层;当前索引仍包含不同类型、来源和派生记录 |
|
| 129 |
+
| 37,279 compatible assets | **一致但需定义** | 应写成 “37,279 compatibility-index entries/descriptors”,不要写成 37,279 个原始几何文件 |
|
| 130 |
+
| 46,910 assets | **当前正文/附录 PDF 未见该表述** | 如果后续草稿出现,应先说明它对应哪个漏斗阶段;当前可核实的主分支索引是 37,279 |
|
| 131 |
+
| 324 GiB asset closure | **论文未报告** | 这是服务器发布/复现清点量,不是论文数据集规模 |
|
| 132 |
+
| HSSD/Objaverse/ArtVIP/ReplicaCAD/YCB | **论文来源摘要不完整** | 主分支 compatibility index 还包含 InteriorAgent、MolmoSpaces、Lightwheel、Poly Haven、GSO、ambientCG;附录可补完整 source table |
|
| 133 |
+
|
| 134 |
+
## 建议补充文字
|
| 135 |
+
|
| 136 |
+
```text
|
| 137 |
+
The asset counts in this supplement refer to different stages of the asset
|
| 138 |
+
funnel. The 120K+ figure denotes the raw multi-source asset pool. After repair
|
| 139 |
+
and pre-screening, 23,221 usable models remained, of which 19,795 passed the
|
| 140 |
+
runtime qualification gate. The main-branch compatibility index contains
|
| 141 |
+
37,279 indexed descriptors, including object, material, fragment, room/scene,
|
| 142 |
+
and lighting records from HSSD, InteriorAgent, MolmoSpaces, ArtVIP, Lightwheel,
|
| 143 |
+
ReplicaCAD, Poly Haven, GSO, YCB, ambientCG, and the indoor material library.
|
| 144 |
+
These are index entries rather than 37,279 unique downloadable geometry files.
|
| 145 |
+
```
|
| 146 |
+
|
| 147 |
+
若论文需要给出类别实例数,应把它标成“主分支 compatibility-index category counts”,不要把 308 个 refrigerator descriptor、1,624 个 table-like descriptor 或 1,165 个 chair-related descriptor写成数据集中实际摆放的物体数。
|
docs/reproduction/asset_release_plan/资产开源与复现准备_主分支_20261121.html
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!doctype html>
|
| 2 |
+
<html lang="zh-CN"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>RoboHomeGen 主分支资产开源与复现准备</title>
|
| 3 |
+
<style>
|
| 4 |
+
:root{--ink:#202724;--muted:#5c6862;--line:#dbe4df;--soft:#f3f7f4;--green:#166b4b;--orange:#8a5e17}*{box-sizing:border-box}body{margin:0;background:#edf1ee;color:var(--ink);font:15px/1.8 "Noto Sans CJK SC","Microsoft YaHei",Arial,sans-serif}main{max-width:1180px;margin:26px auto;background:#fff;padding:38px 48px 60px}header{border-bottom:2px solid #202724;padding-bottom:20px}h1{font-size:30px;line-height:1.4;margin:8px 0}h2{font-size:22px;margin:32px 0 12px}h3{font-size:17px;margin:22px 0 8px}p{margin:9px 0 14px}.eyebrow{color:var(--green);font-weight:bold;font-size:13px}.muted{color:var(--muted)}.note{border-left:4px solid var(--green);background:var(--soft);padding:12px 16px;margin:18px 0}.warn{border-left-color:var(--orange);background:#fcf7ed}table{border-collapse:collapse;width:100%;margin:14px 0;font-size:13px;line-height:1.65}th,td{border-bottom:1px solid var(--line);padding:9px 10px;text-align:left;vertical-align:top}th{background:var(--soft)}code,pre{font-family:"DejaVu Sans Mono",Consolas,monospace}code{font-size:.88em;overflow-wrap:anywhere}pre{background:#f5f7f6;padding:15px;overflow:auto;font-size:12px;line-height:1.55;border:1px solid var(--line)}a{color:var(--green);overflow-wrap:anywhere}.tag{font-size:12px;color:var(--green);font-weight:bold}.small{font-size:13px;color:var(--muted)}.top{display:flex;justify-content:space-between;gap:20px}.top a{font-size:13px;text-decoration:none}@media print{@page{size:A4;margin:15mm}body{background:#fff;font-size:10pt}main{margin:0;padding:0;max-width:none}h2{break-after:avoid}table,pre,.note{break-inside:avoid}a{color:inherit;text-decoration:none}.top a{display:none}}
|
| 5 |
+
</style></head><body><main>
|
| 6 |
+
<header><div class="top"><div><div class="eyebrow">ROBOHOMEGEN · MAIN BRANCH RELEASE PREPARATION</div><h1>主分支资产开源、复现准备与服务器清点</h1></div><a href="javascript:window.print()">打印 / 导出 PDF</a></div><p class="muted">清点日期:2026-11-21(Asia/Shanghai)。范围:candidate19 / config-F / replay-20261115-1647。</p></header>
|
| 7 |
+
<div class="note warn"><strong>范围声明:</strong>本文件只保留论文最终主分支。1110、1113、residential replay、消融、去包络 200 次运行均为清理候选,不进入发布树;本次没有删除或移动远程数据。HF token 尚未提供,因此没有执行上传。</div>
|
| 8 |
+
<h2>1. 资产分布</h2><table><tr><th>主机</th><th>关键目录</th><th>作用</th></tr><tr><td>H200-1</td><td><code>/data/RPHomeGen/candidate19_replay_20261115_1647/</code><br><code>/data/tutu/robohomegen/scene_evidence_repair_20261103/</code><br><code>/data/RPHomeGen/nas_mirror/</code></td><td>主代码运行副本、37,279 条检索/外观索引、NAS 本地镜像、prepared pool 和 runtime 闭包。</td></tr><tr><td>H200-2</td><td><code>/data/zhf/rparen_eval_ws/wholehouse_generation_20261023_fusion/inputs/runtime_data/</code><br><code>/data/RPHomeGen/public_assets_20261115/</code></td><td>运行时副本、basisu、来源清单、公开资产下载控制目录。</td></tr><tr><td>H20-96-1</td><td><code>/data/RPHomeGen/candidate19_replay_20261115_1647/tree/engine/runs/</code></td><td>60 次主分支 case,55 个场景包。</td></tr><tr><td>NAS</td><td><code>/mnt/nas-h/zhf/rp_robohavengen/asset_library/</code><br><code>/mnt/nas-h/zhf/rhg_asset_audit_20261013_v1/</code><br><code>/mnt/nas-h/zhf/rhg_style_joint_20261013/</code></td><td>公开数据入口、非公开材质/厨房/HDRI、HSSD/Molmo 修复、MDL/material acceptance。</td></tr></table>
|
| 9 |
+
<p class="small">当前只读探测:H200-1 可用约 1.2 TiB,H200-2 约 559 GiB,H20-96-1 约 1.3 TiB。NAS 11-19 清单记录约剩 6 TiB;NAS 本次未通过 SSH alias 重新探测。</p>
|
| 10 |
+
<h2>2. 主分支 tree</h2><pre>candidate19_replay_20261115_1647/
|
| 11 |
+
├── tree/ # 生成器源码、engine、tools
|
| 12 |
+
│ ├── scene_workflow.py
|
| 13 |
+
│ ├── engine/
|
| 14 |
+
│ ├── tools/
|
| 15 |
+
│ └── source_manifest.json # 冻结源码 SHA256
|
| 16 |
+
├── attribute_index_cache/ # 可重建缓存
|
| 17 |
+
├── registration.json
|
| 18 |
+
└── README.md
|
| 19 |
+
|
| 20 |
+
scene_evidence_repair_20261103/
|
| 21 |
+
├── full_matrix_reviewed_compatibility.sqlite3 # 37,279 descriptors
|
| 22 |
+
├── front_probe/published/.../records.jsonl # 属性发布记录
|
| 23 |
+
└── final-source-hashes.json
|
| 24 |
+
|
| 25 |
+
rebuild_current_pool_v2/
|
| 26 |
+
├── full/prepared_assets.sqlite3 # 309 candidates
|
| 27 |
+
├── supplement/prepared_assets.sqlite3 # 102 candidates
|
| 28 |
+
└── ready.json
|
| 29 |
+
|
| 30 |
+
nas_mirror/
|
| 31 |
+
├── RPHome -> /data/RPHome
|
| 32 |
+
├── zhf/rp_robohavengen/asset_library/
|
| 33 |
+
├── zhf/rhg_asset_audit_20261013_v1/
|
| 34 |
+
├── zhf/rhg_asset_repair_20261013_v2/
|
| 35 |
+
└── zhf/rhg_style_joint_20261013/</pre>
|
| 36 |
+
<h2>3. 公开资产 tree 与转换</h2><pre>asset-bundles/
|
| 37 |
+
├── hssd/
|
| 38 |
+
│ ├── original/ # 原始 GLB/URDF
|
| 39 |
+
│ ├── derived/basis-decode/ # BasisU 解码/修复 GLB
|
| 40 |
+
│ └── manifests/ # source/derived hash + repair recipe
|
| 41 |
+
├── artvip/
|
| 42 |
+
│ ├── original/ # USD / Materials / Textures
|
| 43 |
+
│ └── manifests/
|
| 44 |
+
├── interioragent/
|
| 45 |
+
│ ├── original/ # 内部保存,公开版不含几何
|
| 46 |
+
│ └── manifests/ # 下载和许可信息
|
| 47 |
+
├── molmospaces/
|
| 48 |
+
│ ├── archives/ # tar / tar.zst
|
| 49 |
+
│ ├── unpacked/ # USD/USDA 展开件
|
| 50 |
+
│ └── manifests/archive_members.jsonl
|
| 51 |
+
├── gso/ polyhaven/ ycb/
|
| 52 |
+
│ ├── original/
|
| 53 |
+
│ ├── canonical/usd/
|
| 54 |
+
│ └── manifests/
|
| 55 |
+
├── lightwheel/
|
| 56 |
+
│ ├── original/usd/
|
| 57 |
+
│ └── manifests/md5.jsonl
|
| 58 |
+
└── replicacad/
|
| 59 |
+
├── original/{glb,urdf}/
|
| 60 |
+
└── manifests/</pre>
|
| 61 |
+
<table><tr><th>数据</th><th>转换</th><th>项目内脚本 / 说明</th></tr><tr><td>HSSD</td><td>原始 GLB 保留;BasisU 解码、GLB/JSON 修复件独立命名并绑定源 hash。</td><td><code>rphome_scripts/asset_downloads_20261115/control/downloader.py</code>、HSSD control manifests、NAS repairs。</td></tr><tr><td>MolmoSpaces</td><td>tar/tar.zst 解包;生成 archive-member 映射;部分 USD 做依赖路径修复。</td><td><code>rphome_scripts/asset_downloads_20261115/conversion_reference/README.md</code>;<code>rhg_asset_audit_20261013_v1/repairs/</code>。</td></tr><tr><td>GSO / Poly Haven</td><td>raw 不改;生成 canonical USD、材质/纹理索引、preprocess plan 和 validation manifest。</td><td><code>rphome_scripts/matrix/rph_readme_asset_conversion.py</code>;<code>conversion_reference/scripts/preprocess_high_fidelity_assets.py</code>。</td></tr><tr><td>YCB / ReplicaCAD / Lightwheel</td><td>按来源控制文件转换或解包;Lightwheel 原生 USD 不改,保留 378 项 MD5。</td><td><code>public_assets_20261115/control/</code> 及对应日志。</td></tr><tr><td>RPLAN</td><td>不上传房间几何;只上传 case 编号、recipes、重建脚本,用户自行下载 Graph2Plan Data.zip。</td><td><code>release_prep/cases20_floorplans/rebuild_cases20_floorplans.py</code>;scene_018 有独立重转换。</td></tr><tr><td>MDL / 材质</td><td>MDL distill/bake;DX→GL 法线转换;native graph 保持;所有结果写 acceptance manifest。</td><td><code>rphome_scripts/asset_downloads_20261115/conversion_reference/docs/official-mdl-pipeline.md</code>。</td></tr></table>
|
| 62 |
+
<h2>4. 非公开资产与软链接规则</h2><pre>restricted-internal/
|
| 63 |
+
├── interior_blender_materials/
|
| 64 |
+
├── kitchen_upload/ + pbr_upload_20261005/
|
| 65 |
+
├── poliigon_supplement/
|
| 66 |
+
├── sky_collection_20261004/
|
| 67 |
+
├── interioragent_derived/
|
| 68 |
+
├── nvidia_mdl/
|
| 69 |
+
├── main-scenes/
|
| 70 |
+
└── link-map/symlinks.jsonl</pre><p>项目自有软链接:上传实体 target + <code>symlinks.jsonl</code>(link_path、target_path、target_sha256、class)。第三方软链接:不上传 dangling link,发布来源 URL、版本、hash、许可和重建脚本。HF Git/LFS 不被当作跨主机软链接系统。</p>
|
| 71 |
+
<h2>5. Hugging Face 仓库规划</h2><table><tr><th>仓库</th><th>内容</th><th>访问</th></tr><tr><td><code>ORG/robohomegen-public-assets</code></td><td>许可允许的公开原件、转换件、下载收据、manifest、NOTICE。</td><td>public dataset</td></tr><tr><td><code>ORG/robohomegen-reproduction</code></td><td>代码侧 manifest、cases20 rebuild、下载/转换脚本、环境说明。</td><td>public dataset / code companion</td></tr><tr><td><code>ORG/robohomegen-assets-private</code></td><td>索引、标注、修复件、软链接 map、项目自有硬资产。</td><td>private dataset</td></tr><tr><td><code>ORG/robohomegen-scenes-private</code></td><td>主分支场景和外链依赖,仅在权利允许时使用。</td><td>private dataset</td></tr></table><div class="note warn"><strong>许可证边界:</strong>“私有 HF”不是许可证豁免。InteriorAgent、商业材质、PG Skies、Poliigon、NVIDIA 受限材料不能因为有 token 就上传;这些仓库只能放 metadata、link-map、版本和下载/转换说明。项目自有索引和修复件可以放私有仓库。</div><p>每个仓库统一:</p><pre>repo/
|
| 72 |
+
├── README.md LICENSE NOTICE/
|
| 73 |
+
├── manifests/{asset_manifest.jsonl,symlinks.jsonl,source_revisions.json,sha256sums.txt}
|
| 74 |
+
├── datasets/<dataset>/{original,derived/<recipe_id>}/
|
| 75 |
+
├── indexes/<name>/
|
| 76 |
+
├── converters/<dataset>/
|
| 77 |
+
└── configs/</pre><p>当前未上传。拿到 token 后先创建 private/public repo,再用 manifest 分批上传,上传前执行许可证扫描、密钥扫描、SHA256 校验和 SQLite 路径闭包检查。</p>
|
| 78 |
+
<h2>6. 主分支最小复现路径</h2><ol><li>下载代码、reproduction manifest 和公开数据;用户自行获得 RPLAN/Graph2Plan。</li><li>按 recipes 重建 20 个输入和户型,并验证 hash。</li><li>恢复公开索引、prepared pool ���运行时模板。</li><li>若要复现论文主分支的原始资产选择,再获得 private assets、annotation release、MDL acceptance 和 link-map。</li><li>受限资产缺失时只能称为公开资产路径复现;不能称为主分支字节级复现。</li></ol>
|
| 79 |
+
<h2>7. 当前附件</h2><p><a href="资产开源与复现准备_主分支_20261121.md">Markdown 版本</a> · <a href="hf_upload_manifest.tsv">HF 上传 manifest</a> · <a href="../服务器资产清点_20261119/服务器资产清点与复现准备_20261119.md">2026-11-19 原始清点底稿</a>。</p>
|
| 80 |
+
</main></body></html>
|
docs/reproduction/asset_release_plan/资产开源与复现准备_主分支_20261121.md
ADDED
|
@@ -0,0 +1,290 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# RoboHomeGen 主分支资产清点、复现准备与 Hugging Face 发布计划
|
| 2 |
+
|
| 3 |
+
清点日期:2026-11-21(Asia/Shanghai)。本文件只保留论文最终使用的主分支:
|
| 4 |
+
|
| 5 |
+
- `candidate19 replay`
|
| 6 |
+
- 标签:`robohomegen__candidate19-20261112__config-F__replay-20261115-1647`
|
| 7 |
+
- 60 次生成尝试,55 个保存场景
|
| 8 |
+
|
| 9 |
+
1110、1113、`residential_replay_20261115_1705`、三个消融、去包络 200 次等都不进入主分支发布树,只保留为服务器清理候选。原始资产没有删除、移动或覆盖;本次只做只读清点和发布规划。
|
| 10 |
+
|
| 11 |
+
## 先看总量
|
| 12 |
+
|
| 13 |
+
这里区分“主分支逻辑资产闭包”和“服务器物理副本”。副本之间有大量重复,不能把所有服务器数字直接相加。
|
| 14 |
+
|
| 15 |
+
### 主分支逻辑资产闭包:约 324 GiB
|
| 16 |
+
|
| 17 |
+
| 类别 | 大小 | 包含内容 |
|
| 18 |
+
|---|---:|---|
|
| 19 |
+
| 公开数据集原件 | **43.4 GiB** | HSSD、ArtVIP、InteriorAgent、Lightwheel、MolmoSpaces、ReplicaCAD、YCB、GSO、Poly Haven、ambientCG |
|
| 20 |
+
| 非公开/受限原件 | **45.1 GiB** | 室内 Blender 材质库、厨房模型与 PBR、商业材质、PG Skies HDRI |
|
| 21 |
+
| 项目衍生件 | **131.5 GiB** | HSSD/Molmo/USD 修复件、MDL 烘焙件、prepared_D、下载解包/转换件 |
|
| 22 |
+
| 索引、标注、prepared pool、artifact/法线缓存 | **42.9 GiB** | 37,279 条检索矩阵、属性发布记录、家具审计、资产池、artifact cache、normal_dx_to_gl |
|
| 23 |
+
| 主分支 60 次运行目录 | **61.4 GiB** | 55 个保存场景及 5 个失败尝试的运行记录 |
|
| 24 |
+
| **逻辑闭包合计** | **约 324 GiB** | 2026-11-19 `du` 清点 |
|
| 25 |
+
|
| 26 |
+
### 当前主要物理副本
|
| 27 |
+
|
| 28 |
+
| 位置 | 大小 | 与上表关系 |
|
| 29 |
+
|---|---:|---|
|
| 30 |
+
| H20-96-1 candidate19 场景 | **62 GiB** | 主分支场景目录,已计入闭包 |
|
| 31 |
+
| H200-1 `/data/RPHomeGen/nas_mirror` | **约 271 GiB** | NAS 资产镜像,包含公开、受限和衍生副本 |
|
| 32 |
+
| H200-1 candidate19 运行副本 | **329 MiB** | 代码树、manifest、attribute cache |
|
| 33 |
+
| H200-2 `public_assets_20261115` | **约 12 GiB** | 下载控制目录和部分公开资产;大目录当前是 NAS 软链接 |
|
| 34 |
+
| H200-1 主分支槽位缓存 | **约 85 GiB** | 可重建缓存,部分材质/法线文件被场景外链引用 |
|
| 35 |
+
|
| 36 |
+
### 发布量预估
|
| 37 |
+
|
| 38 |
+
- 公开/可再分发包:预计 **70–90 GiB**。
|
| 39 |
+
- 项目自有私有索引、标注、修复件和 link-map:预计 **40–70 GiB**。
|
| 40 |
+
- 受限内部资产与完整主分支场景:约 **113 GiB 以上**。
|
| 41 |
+
- 这些是发布包估算,不与 324 GiB 再相加;最终 HF 大小以实际 LFS 对象和 `sha256sums.txt` 为准。
|
| 42 |
+
|
| 43 |
+
## 结论
|
| 44 |
+
|
| 45 |
+
1. 主分支不是一个自包含的 62 GB 场景目录。`.blend` 中含部分导入后的几何,但贴图、材质库、HDRI、MDL 产物、索引和 SQLite 中仍有外部绝对路径。
|
| 46 |
+
2. 主分支的复现闭包分布在 H200-1、H200-2、H20-96-1、NAS 四处;H200-1 的 `/data/RPHomeGen/nas_mirror` 是 NAS 资产的本地镜像,不是独立的公开发行包。
|
| 47 |
+
3. 公开数据可下载,但“下载原始数据”不能自动得到主分支使用的修复件、索引和 prepared pool。主分支检索库约 37,279 条描述,其中约 17,727 条指向修复/转换产物。
|
| 48 |
+
4. 后续 HF 发布应采用三个层次:
|
| 49 |
+
- **公开仓库**:代码、复现脚本、下载收据、允许再分发的公开资产和索引。
|
| 50 |
+
- **私有仓库**:项目自有索引、标注、修复件、软链接映射和在许可允许时的主分支场景。
|
| 51 |
+
- **不可上传目录**:InteriorAgent、商业材质、PG Skies、Poliigon、NVIDIA 受限材料等只发布下载说明、版本和校验方法。
|
| 52 |
+
|
| 53 |
+
用户要求“非公开资产也上传 HF”可以落地为 **私有 HF 仓库**,但不能绕过原始数据集许可;私有仓库也不自动获得再分发权。当前没有 HF token,本次没有执行任何上传。
|
| 54 |
+
|
| 55 |
+
## 服务器分布
|
| 56 |
+
|
| 57 |
+
| 主机 | 主分支相关位置 | 当前用途 |
|
| 58 |
+
|---|---|---|
|
| 59 |
+
| H200-1 / `zp-nc67` | `/data/RPHomeGen/candidate19_replay_20261115_1647/` | candidate19 运行副本:`tree/`、`source_manifest.json`、`attribute_index_cache/` |
|
| 60 |
+
| H200-1 | `/data/tutu/robohomegen/scene_evidence_repair_20261103/` | 37,279 条检索/外观 SQLite、front probe、发布记录 |
|
| 61 |
+
| H200-1 | `/data/tutu/robohomegen/current_vs_v31_20261031/rebuild_current_pool_v2/` | prepared pool:full 309、supplement 102 |
|
| 62 |
+
| H200-1 | `/data/tutu/wholehouse_taskinput_20261028_v26/portable_inputs/bundle/rootfs/` | 便携 rootfs 与运行输入 |
|
| 63 |
+
| H200-1 | `/data/zhf/wholehouse_input_cache/` | runtime template 与 blobs |
|
| 64 |
+
| H200-1 | `/data/RPHomeGen/nas_mirror/` | NAS 的本地镜像,约 271 GiB;通过软链接/路径兼容主线依赖 |
|
| 65 |
+
| H200-1 | `/data/RPHomeGen/public_assets_20261115/` | 公开数据下载、转换控制文件;当前目录约 12 GiB,`archives`、`conversion_inputs`、`derived` 是指向 NAS 的软链接 |
|
| 66 |
+
| H200-2 / `zp-nc68` | `/data/zhf/rparen_eval_ws/wholehouse_generation_20261023_fusion/inputs/runtime_data/` | runtime_data、basisu、来源清单、运行时副本 |
|
| 67 |
+
| H200-2 | `/data/zhf/rhg_rplan_expansion_20261013/` | RPLAN 派生转换记录和 source receipts |
|
| 68 |
+
| H20-96-1 | `/data/RPHomeGen/candidate19_replay_20261115_1647/tree/engine/runs/` | 主分支 60 个 case 目录,55 个包含最终 `.blend` |
|
| 69 |
+
| NAS `/mnt/nas-h` | `/mnt/nas-h/zhf/rp_robohavengen/asset_library/` | 主资产库:公开资产软链、非公开材质、厨房模型、HDRI、注册表 |
|
| 70 |
+
| NAS | `/mnt/nas-h/zhf/rhg_asset_audit_20261013_v1/`、`rhg_asset_repair_20261013_v2/` | HSSD、MolmoSpaces、USD 路径修复及来源审计 |
|
| 71 |
+
| NAS | `/mnt/nas-h/zhf/rhg_style_joint_20261013/` | MDL SDK、material acceptance、prepared_D、bake cache、材质库 |
|
| 72 |
+
|
| 73 |
+
当前只读核对的磁盘状态:H200-1 `/data` 约 1.2 TiB 可用,H200-2 约 559 GiB 可用,H20-96-1 约 1.3 TiB 可用。H200-2 和 H200-1 的大目录存在 `tutu` 专属临时目录,普通用户 `du` 会出现权限错误;发布前应由目录所有者生成最终清单。
|
| 74 |
+
|
| 75 |
+
## 主分支运行闭包
|
| 76 |
+
|
| 77 |
+
```text
|
| 78 |
+
candidate19_replay_20261115_1647/
|
| 79 |
+
├── tree/
|
| 80 |
+
│ ├── scene_workflow.py
|
| 81 |
+
│ ├── engine/ # 主生成器源码
|
| 82 |
+
│ ├── tools/ # 路径迁移、验证、辅助工具
|
| 83 |
+
│ └── source_manifest.json # 冻结源码哈希
|
| 84 |
+
├── attribute_index_cache/ # 可重建缓存;不作为唯一发布依赖
|
| 85 |
+
├── registration.json
|
| 86 |
+
├── README.md
|
| 87 |
+
└── runner.log
|
| 88 |
+
|
| 89 |
+
/data/tutu/robohomegen/scene_evidence_repair_20261103/
|
| 90 |
+
├── full_matrix_reviewed_compatibility.sqlite3 # 37,279 descriptors
|
| 91 |
+
├── front_probe/published/.../records.jsonl # 专家属性发布记录
|
| 92 |
+
├── compatibility-publication.json
|
| 93 |
+
└── final-source-hashes.json
|
| 94 |
+
|
| 95 |
+
/data/tutu/robohomegen/current_vs_v31_20261031/rebuild_current_pool_v2/
|
| 96 |
+
├── full/prepared_assets.sqlite3 # 309 candidates
|
| 97 |
+
├── supplement/prepared_assets.sqlite3 # 102 candidates
|
| 98 |
+
└── ready.json
|
| 99 |
+
|
| 100 |
+
/data/RPHomeGen/nas_mirror/
|
| 101 |
+
├── RPHome -> /data/RPHome # 项目路径兼容链接
|
| 102 |
+
├── zhf/rp_robohavengen/asset_library/ # 公开资产 + 非公开材质的注册树
|
| 103 |
+
├── zhf/rhg_asset_audit_20261013_v1/ # audit / repairs / molmo_extracted
|
| 104 |
+
├── zhf/rhg_asset_repair_20261013_v2/ # 二次修复、variants、plants
|
| 105 |
+
├── zhf/rhg_style_joint_20261013/ # MDL / material acceptance / bake cache
|
| 106 |
+
└── zhf/h200_1_organized_20261120/ # 迁移整理副本
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## 公开资产与格式转换
|
| 110 |
+
|
| 111 |
+
### HSSD
|
| 112 |
+
|
| 113 |
+
```text
|
| 114 |
+
public_assets_20261115/
|
| 115 |
+
├── assets/high_quality/hssd-hab/ # 原始下载快照(Hugging Face)
|
| 116 |
+
├── control/
|
| 117 |
+
│ ├── hssd.files.json
|
| 118 |
+
│ ├── hssd.verified.jsonl
|
| 119 |
+
│ ├── hssd_models_priority.files.json
|
| 120 |
+
│ └── hssd.status.json
|
| 121 |
+
├── conversion_code/ # 下载/校验/转换控制脚本
|
| 122 |
+
└── derived/ # HSSD 修复/解码产物,当前多为 NAS 软链接
|
| 123 |
+
```
|
| 124 |
+
|
| 125 |
+
主线需要的 HSSD 条目包含原始 GLB/URDF、BasisU 解码后可读 GLB、JSON 元数据修复件和来源哈希。公开版必须同时保留 `source_sha256`、`derived_sha256`、修复原因和脚本版本。修复后的 GLB 不是原始文件,不能覆盖原始文件名。
|
| 126 |
+
|
| 127 |
+
### ArtVIP / InteriorAgent / MolmoSpaces
|
| 128 |
+
|
| 129 |
+
```text
|
| 130 |
+
asset-bundles/
|
| 131 |
+
├── artvip/
|
| 132 |
+
│ ├── original/ # USD、Textures、Materials、相对引用
|
| 133 |
+
│ ├── manifests/ # 下载、SHA256、license
|
| 134 |
+
│ └── derived/ # 仅项目自有路径修复
|
| 135 |
+
├── interioragent/
|
| 136 |
+
│ ├── original/ # 只在内部保存
|
| 137 |
+
│ ├── manifests/ # 可公开元数据与下载说明
|
| 138 |
+
│ └── derived/ # 不公开几何/材质派生件
|
| 139 |
+
└── molmospaces/
|
| 140 |
+
├── archives/ # tar / tar.zst 原始包
|
| 141 |
+
├── unpacked/ # 按归档成员展开的 USD
|
| 142 |
+
├── manifests/archive_members.jsonl
|
| 143 |
+
└── derived/path-repaired/
|
| 144 |
+
```
|
| 145 |
+
|
| 146 |
+
MolmoSpaces 做的是归档解包和 USD 依赖路径修复;InteriorAgent 做的是 Materials/Textures/Meshes 相对路径保持和必要的路径派生。InteriorAgent 条款禁止通过其他媒介再分发下载数据,因此只能上传索引、版本、来源、转换脚本和内部私有清单,不能把几何打进公共 HF 仓库。
|
| 147 |
+
|
| 148 |
+
### GSO / Poly Haven / YCB / Lightwheel / ReplicaCAD
|
| 149 |
+
|
| 150 |
+
```text
|
| 151 |
+
asset-bundles/
|
| 152 |
+
├── gso/
|
| 153 |
+
│ ├── original/archives/*.zip
|
| 154 |
+
│ ├── canonical/usd/*.usdc
|
| 155 |
+
│ └── manifests/{source,conversion,validation}.jsonl
|
| 156 |
+
├── polyhaven/
|
| 157 |
+
│ ├── original/{models,materials,hdri}/
|
| 158 |
+
│ ├── canonical/usd/
|
| 159 |
+
│ └── manifests/
|
| 160 |
+
├── ycb/
|
| 161 |
+
│ ├── original/{obj,texture}/
|
| 162 |
+
│ ├── canonical/usd/
|
| 163 |
+
│ └── manifests/
|
| 164 |
+
├─�� lightwheel/
|
| 165 |
+
│ ├── original/usd/
|
| 166 |
+
│ └── manifests/md5.jsonl
|
| 167 |
+
└── replicacad/
|
| 168 |
+
├── original/{glb,urdf}/
|
| 169 |
+
└── manifests/
|
| 170 |
+
```
|
| 171 |
+
|
| 172 |
+
转换记录:
|
| 173 |
+
|
| 174 |
+
| 来源 | 实际转换 | 脚本位置 |
|
| 175 |
+
|---|---|---|
|
| 176 |
+
| GSO / Poly Haven | 保留 raw;通过项目的 high-fidelity preprocessing 生成 canonical USD、材质/纹理索引和验证 manifest;不改 raw | `rphome_scripts/asset_downloads_20261115/conversion_reference/scripts/preprocess_high_fidelity_assets.py`(说明入口:同目录 `README.md`);主控:`rphome_scripts/matrix/rph_readme_asset_conversion.py` |
|
| 177 |
+
| YCB | 从作者模型转换为项目使用的 USD 表示,保留来源文件与作者哈希 | `rphome_scripts/asset_downloads_20261115/control/prepare_archives.py` 与对应控制日志 |
|
| 178 |
+
| Lightwheel | ZIP 解包;原生 USD 不改写;用 378 项 MD5 清单验收 | `rphome_scripts/asset_downloads_20261115/control/downloader.py` |
|
| 179 |
+
| MolmoSpaces | tar/tar.zst 解包;成员映射写入 archive manifest;部分 USD 依赖路径修复 | `rphome_scripts/asset_downloads_20261115/conversion_reference/README.md`;修复记录在 `rhg_asset_audit_20261013_v1/repairs/` |
|
| 180 |
+
| HSSD | BasisU 解码/GLB 修复/JSON 元数据修复;原始 GLB 保留 | 下载与修复回执:`public_assets_20261115/control/hssd.*`;主线派生件在 `rhg_asset_audit_20261013_v1/repairs/` |
|
| 181 |
+
| RPLAN | 不是资产上传;只发布 case 编号、recipes 和重建脚本,用户自行下载 Graph2Plan `Data.zip` | `release_prep/cases20_floorplans/rebuild_cases20_floorplans.py`;分组 A/B/C 与 scene_018 双版本见其 README |
|
| 182 |
+
| MDL / 材质 | MDL SDK distill/bake;法线贴图做 DX→GL 转换;native graph 保持不变;写入 acceptance manifest | `rphome_scripts/asset_downloads_20261115/conversion_reference/docs/official-mdl-pipeline.md`;`rphome_scripts/matrix/rph_readme_asset_conversion.py` |
|
| 183 |
+
|
| 184 |
+
## 非公开资产组织形式
|
| 185 |
+
|
| 186 |
+
```text
|
| 187 |
+
restricted-internal/
|
| 188 |
+
├── interior_blender_materials/ # 38.87G,非公开材质库
|
| 189 |
+
├── kitchen_upload/ # 厨房模型
|
| 190 |
+
├── pbr_upload_20261005/ # 厨房 PBR
|
| 191 |
+
├── poliigon_supplement/ # 商业材质
|
| 192 |
+
├── sky_collection_20261004/ # PG Skies HDRI
|
| 193 |
+
├── interioragent_derived/ # InteriorAgent 派生 USD / variants / bake
|
| 194 |
+
├── nvidia_mdl/ # NVIDIA MDL / IsaacSim 材质副本
|
| 195 |
+
├── main-scenes/ # 55 个主分支场景与外链依赖
|
| 196 |
+
└── link-map/
|
| 197 |
+
├── symlinks.jsonl # 原始 link_path、target_path、target_sha256、class
|
| 198 |
+
└── materialized_targets/ # 项目自有目标的实体文件
|
| 199 |
+
```
|
| 200 |
+
|
| 201 |
+
软链接发布规则:
|
| 202 |
+
|
| 203 |
+
1. 对项目自有目标:上传实体目标文件,并额外上传 `symlinks.jsonl` 还原原始逻辑路径。
|
| 204 |
+
2. 对第三方目标:不上传 dangling symlink;上传 link record、原始来源 URL、版本、SHA256、许可和重建脚本。
|
| 205 |
+
3. HF Git/LFS 不应被当作跨主机软链接存储。发布树必须能在干净机器解包后独立校验;软链接只作为 provenance,不作为唯一数据载体。
|
| 206 |
+
4. 主分支 `.blend` 若引用了受限纹理/材质,不能放入公共仓库。公共版提供 manifest、渲染图、场景实体清单和重建脚本;私有版在权利允许时才放完整 `.blend` 与依赖。
|
| 207 |
+
|
| 208 |
+
## Hugging Face 发布组织
|
| 209 |
+
|
| 210 |
+
建议使用以下仓库,而不是把所有东西塞进一个仓库:
|
| 211 |
+
|
| 212 |
+
```text
|
| 213 |
+
ORG/robohomegen-public-assets/ # public, only redistributable data and receipts
|
| 214 |
+
ORG/robohomegen-reproduction/ # public, code-side manifests, cases20 rebuild, converters
|
| 215 |
+
ORG/robohomegen-assets-private/ # private, project-owned indexes, annotations, repairs, link maps
|
| 216 |
+
ORG/robohomegen-scenes-private/ # private, if rights permit; otherwise internal NAS only
|
| 217 |
+
```
|
| 218 |
+
|
| 219 |
+
每个仓库顶层建议统一为:
|
| 220 |
+
|
| 221 |
+
```text
|
| 222 |
+
repo/
|
| 223 |
+
├── README.md
|
| 224 |
+
├── LICENSE
|
| 225 |
+
├── NOTICE/
|
| 226 |
+
├── manifests/
|
| 227 |
+
│ ├── asset_manifest.jsonl
|
| 228 |
+
│ ├── symlinks.jsonl
|
| 229 |
+
│ ├── source_revisions.json
|
| 230 |
+
│ └── sha256sums.txt
|
| 231 |
+
├── datasets/<dataset>/original/
|
| 232 |
+
├── datasets/<dataset>/derived/<recipe_id>/
|
| 233 |
+
├── indexes/<name>/
|
| 234 |
+
├── converters/<dataset>/
|
| 235 |
+
├── configs/
|
| 236 |
+
└── docs/
|
| 237 |
+
```
|
| 238 |
+
|
| 239 |
+
HF 上传必须保留:原始来源、版本/commit、文件 SHA256、格式、单位、坐标系、转换 recipe、转换脚本相对路径、许可和是否被主分支实际引用。HF LFS 用于大文件;SQLite、JSONL 和 manifest 应保持可直接 diff 的小文件形式。
|
| 240 |
+
|
| 241 |
+
当前阶段只生成上传清单,没有 HF token,因此**没有执行上传**。拿到 token 后按以下顺序:
|
| 242 |
+
|
| 243 |
+
```bash
|
| 244 |
+
# 仅示例;先确认 repo 权限和许可证,再执行
|
| 245 |
+
huggingface-cli repo create ORG/robohomegen-public-assets --type dataset
|
| 246 |
+
git clone https://huggingface.co/datasets/ORG/robohomegen-public-assets
|
| 247 |
+
rsync -a --delete --exclude='*.tmp' prepared_release/public-assets/ repo/datasets/
|
| 248 |
+
sha256sum -c manifests/sha256sums.txt
|
| 249 |
+
git lfs install && git add . && git commit -m "release public assets and provenance" && git push
|
| 250 |
+
```
|
| 251 |
+
|
| 252 |
+
私有仓库采用相同 tree,但额外保留 `access.md` 和每个第三方数据集的许可证明。即使拥有 HF token,也不能上传被原始条款禁止再分发的 InteriorAgent、商业材质或 NVIDIA 受限文件。
|
| 253 |
+
|
| 254 |
+
## 不应纳入主分支发布集的目录
|
| 255 |
+
|
| 256 |
+
只作为服务器清理候选,不进入上面的 tree:
|
| 257 |
+
|
| 258 |
+
- H20-96-1:`scenes_nas_restored_20261115_080049`(1110)、`production_residential_20261113_run_20261115_1810`(1113)、`residential_replay_20261115_1705`。
|
| 259 |
+
- H200-1:`backups/rhg_before_stable_replay_20261115_163637`、旧 `experiments/multiroom*`、旧分支渲染和试跑目录。
|
| 260 |
+
- H200-2 / H20-96-1:消融运行树、去包络 200 次运行、消融渲染 staging。
|
| 261 |
+
|
| 262 |
+
这些目录尚未删除,清理前仍需确认没有线程、评测或论文附件引用。
|
| 263 |
+
|
| 264 |
+
## 复现者最小路径
|
| 265 |
+
|
| 266 |
+
### 公开路径
|
| 267 |
+
|
| 268 |
+
1. 克隆代码。
|
| 269 |
+
2. 从 `ORG/robohomegen-reproduction` 获取 `cases20_public.json`、`recipes_cases20.json` 和 conversion scripts。
|
| 270 |
+
3. 用户自行下载 Graph2Plan/RPLAN、HSSD、ArtVIP、ReplicaCAD 等公开数据,按下载 manifest 校验。
|
| 271 |
+
4. 运行转换脚本生成 canonical USD/GLB 和本地索引。
|
| 272 |
+
5. 用公开可复现的 index 和 `COMPARISON_CONFIG.json` 生成 1 个 case。
|
| 273 |
+
|
| 274 |
+
### 完整内部路径
|
| 275 |
+
|
| 276 |
+
1. 额外获得 `robohomegen-assets-private` 和内部 link-map。
|
| 277 |
+
2. 将 `/mnt/nas-h` 逻辑前缀映射为本地 release root,或运行 SQLite 路径重写器。
|
| 278 |
+
3. 安装 Blender 5.2.1、Python 3.11/Isaac Lab runtime、MDL SDK 2026.0.2 和材质 acceptance 库。
|
| 279 |
+
4. 恢复 `full_matrix_reviewed_compatibility.sqlite3`、prepared pool、annotation release、rootfs 与 runtime blobs。
|
| 280 |
+
5. 运行主线 candidate19 的固定输入和 seed;保留 `source_manifest.json`、所有 manifest、link map、conversion receipts。
|
| 281 |
+
|
| 282 |
+
完整复现需要非公开资产或替代材质时,结果只能称为“代码路径复现”或“公开资产复现”,不能声称与论文主分支字节级一致。
|
| 283 |
+
|
| 284 |
+
## 当前已生成的附件
|
| 285 |
+
|
| 286 |
+
- `hf_upload_manifest.tsv`:按 bundle 列出的 HF 上传清单、许可证类别、转换和状态。
|
| 287 |
+
- 本 Markdown:服务器位置、tree、复现闭包、格式转换和 HF 组织方案。
|
| 288 |
+
- `资产开源与复现准备_主分支_20261121.html`:适合浏览和后续打印的 HTML 版本。
|
| 289 |
+
- `主分支资产类别与论文数字对照_20261121.md`:论文正文/附录数字、SQLite 来源分布、家具类别和冰箱来源的逐项对照。
|
| 290 |
+
|
docs/reproduction/cases20_floorplans/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Rebuilding the 20 RoboHome benchmark floor plans
|
| 2 |
+
|
| 3 |
+
The multi-room benchmark uses 20 floor plans taken from RPLAN (Wu et al., SIGGRAPH Asia 2019). RPLAN may only be used for non-commercial research and may not be redistributed, in whole or in part. This release therefore contains **no room geometry**. It contains only:
|
| 4 |
+
|
| 5 |
+
| File | Content |
|
| 6 |
+
|---|---|
|
| 7 |
+
| `recipes_cases20.json` | For each case: the Graph2Plan record name, the conversion method and parameters, the millimetre residuals of the five hand-adjusted plans, and the sha256 values a rebuild must reproduce |
|
| 8 |
+
| `cases20_public.json` | The 20 case texts: request, entity list, seeds and target area, without rooms |
|
| 9 |
+
| `rebuild_cases20_floorplans.py` | Rebuilds the plans and the shared per-case inputs from your own copy of the data, then checks every hash |
|
| 10 |
+
|
| 11 |
+
## What you need
|
| 12 |
+
|
| 13 |
+
1. **Graph2Plan's `Data.zip`.** Download it from the authors' release at https://github.com/HanHan55/Graph2plan/releases/download/data/Data.zip and accept the RPLAN/Graph2Plan terms.
|
| 14 |
+
- Archive sha256: `e88f1c52eb065a4441f9675f6f5401e3e46add4b3ae6ad96f63fb527b6958cd3`
|
| 15 |
+
- The script reads the member `Network/data.mat`, sha256 `ce1e9c7fc2846c2d5a36485c8fa4d16df9b7de0ccda31581fe76fc2fa6f28adc`.
|
| 16 |
+
2. **The RoboHome code tree**, which provides `tools/rplan/` and the scene-generation engine.
|
| 17 |
+
3. **Optional: the October 2026 snapshot of the v16.1p scene-generation helpers** (`--legacy-generator`). Without it, everything is still checked except the doors and windows of the 14 group-B libraries.
|
| 18 |
+
4. **Python 3.10 or newer** with numpy, scipy and shapely. Pillow is optional and only used for `floorplan.png`.
|
| 19 |
+
|
| 20 |
+
## Run
|
| 21 |
+
|
| 22 |
+
```bash
|
| 23 |
+
python3 rebuild_cases20_floorplans.py --graph2plan Data.zip --robohome-tree /path/to/robohome \
|
| 24 |
+
[--legacy-generator /path/to/legacy_v16_1p_20261013] --out rebuilt/
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
The script takes about 10 s and writes:
|
| 28 |
+
|
| 29 |
+
- `rebuilt/ext_libs/x_<record>.json`: one single-plan library per case. RoboHome reads it through `RHG_RPLAN_SEEDS`; it is each job's `plan_library`.
|
| 30 |
+
- `rebuilt/inputs/cases20/<case>/{request.txt, entities.json, rooms.json, floorplan.svg, floorplan.png, case.json}` and `rebuilt/inputs/cases20.json`: the inputs every method receives.
|
| 31 |
+
- `rebuilt/verification.json`: one entry per check. The script exits with status 1 if a required check fails.
|
| 32 |
+
|
| 33 |
+
## Conversion groups
|
| 34 |
+
|
| 35 |
+
| Group | Cases | Method |
|
| 36 |
+
|---|---|---|
|
| 37 |
+
| A | scene_000–004 | The five original plans. Room boxes are the exclusive source boxes, shifted to the house corner and scaled by the recorded factor. The living room is split 34 % / 66 % on the recorded side. The published residuals then restore the hand adjustments (minimum bathroom and balcony sizes, dining widths) exactly. |
|
| 38 |
+
| B | scene_005–017, scene_019 | October conversion: source boxes, scaled to 90 m² (longest side at most 14.8 m), living room split 34 % / 66 % on the recorded side. |
|
| 39 |
+
| C | scene_018 | Re-converted with `tools/rplan/convert_rplan.py` and screened with `tools/rplan/screen_library.py`, using the recorded options. |
|
| 40 |
+
|
| 41 |
+
Doors, windows and the room topology of groups A and B come from the generator's `add_plan_topology`. RoboHome recomputes doors and windows from the rooms whenever it builds a scene, so the benchmark depends on the rooms.
|
| 42 |
+
|
| 43 |
+
- **Group B:** reproduces the doors and windows of the original files exactly only with the October snapshot.
|
| 44 |
+
- **Group A:** the original doors and windows came from an older code version and are not reproduced. Their `plan_sha256` therefore leaves out the topology keys.
|
| 45 |
+
|
| 46 |
+
**scene_018 uses two versions of record 26376.**
|
| 47 |
+
|
| 48 |
+
- The shared input (`rooms.json`, `floorplan.svg/png`, used by every baseline) keeps the October conversion.
|
| 49 |
+
- RoboHome reads the re-converted library `x_26376.json`, because the October plan was dropped for a door defect.
|
| 50 |
+
|
| 51 |
+
The script rebuilds both versions and checks each against its own hash.
|
| 52 |
+
|
| 53 |
+
## Hashes
|
| 54 |
+
|
| 55 |
+
`canonical(x)` means `json.dumps(x, sort_keys=True, ensure_ascii=False, separators=(",", ":"))`, encoded as UTF-8.
|
| 56 |
+
|
| 57 |
+
| Hash | Covers |
|
| 58 |
+
|---|---|
|
| 59 |
+
| `rooms_sha256` | `canonical(plan["rooms"])` |
|
| 60 |
+
| `plan_core_sha256` | The plan without the provenance keys (`rplan_source_png`, `rplan_source_file`, `local_fallback_seed_manifest`) and without the topology keys (`topology_adjacencies`, `doors`, `windows`, `wall_generation`, `window_rules`) |
|
| 61 |
+
| `plan_sha256` | The plan without the provenance keys; for group A, also without the topology keys |
|
| 62 |
+
|
| 63 |
+
The provenance keys only record where a file was made; the generator does not read them. The rebuilt files carry neutral strings there.
|
| 64 |
+
|
| 65 |
+
Input files (`rooms.json`, `request.txt`, `entities.json`, `floorplan.svg`, `floorplan.png`) are compared byte for byte. A PNG mismatch is only a warning, because PNG encoding depends on the Pillow and zlib versions.
|
| 66 |
+
|
| 67 |
+
**Tested** with Python 3.10.12, numpy 2.2.6, scipy 1.15.3, shapely 2.1.2 and Pillow 12.3.0:
|
| 68 |
+
|
| 69 |
+
- With `--legacy-generator`: all 141 checks pass.
|
| 70 |
+
- Without it: 127 pass and 14 are skipped.
|
| 71 |
+
|
| 72 |
+
## Terms
|
| 73 |
+
|
| 74 |
+
The rebuilt files contain RPLAN-derived geometry and fall under the RPLAN and Graph2Plan terms. Use them for non-commercial research only and do not redistribute them. Cite RPLAN (Wu et al., ACM TOG 38(6), 2019) and Graph2Plan (Hu et al., ACM TOG 39(4), 2020) together with RoboHome.
|
docs/reproduction/cases20_floorplans/cases20_public.json
ADDED
|
@@ -0,0 +1,1751 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema": "robohome.cases20_public.v1",
|
| 3 |
+
"note": "The 20 shared inputs without room geometry. Rooms are rebuilt from the Graph2Plan release by rebuild_cases20_floorplans.py.",
|
| 4 |
+
"source_manifest": {
|
| 5 |
+
"name": "cases_oct50.json",
|
| 6 |
+
"sha256": "e73c65bd6dec990f5fb7115b6f42468edaf9b9cdd8c5b5011b48de5d27b3ac3e",
|
| 7 |
+
"first_n": 20
|
| 8 |
+
},
|
| 9 |
+
"cases": [
|
| 10 |
+
{
|
| 11 |
+
"id": "scene_000",
|
| 12 |
+
"k": 0,
|
| 13 |
+
"seed": 2026101600,
|
| 14 |
+
"prompt": "Generate a complete connected single-storey multi-room apartment with real-scale textured furniture, solid walls, doors and windows, about 81 square metres in total. Keep furniture inside its assigned room, avoid intersections, and preserve door access. The requested rooms and furnishings are: kitchen, containing refrigerator, cabinet; dining room, containing dining table, dining chair; bathroom, containing toilet; master bedroom, containing bed, side table; living room, containing sofa, coffee table; guest bedroom, containing bed, desk; balcony, containing plant. Furniture colours and arrangements may vary. Keep all requested rooms and furniture.",
|
| 15 |
+
"prompt_sha256": "fcbc4a808a181841d2f2d18c0057881e5720e1e037040c48fd21fa0e35005970",
|
| 16 |
+
"floor_plan_id": "rplan_constrained_45966_scene_010_v16_task_contract",
|
| 17 |
+
"rplan_index": 0,
|
| 18 |
+
"target_floor_area_m2": 81,
|
| 19 |
+
"entities": [
|
| 20 |
+
{
|
| 21 |
+
"entity_id": "living__sofa__01__real_sofa",
|
| 22 |
+
"room_id": "living",
|
| 23 |
+
"role": "sofa",
|
| 24 |
+
"layout_slot_id": "sofa"
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"entity_id": "living__coffee_table__01__real_low_coffee_table",
|
| 28 |
+
"room_id": "living",
|
| 29 |
+
"role": "coffee_table",
|
| 30 |
+
"layout_slot_id": "coffee_table"
|
| 31 |
+
},
|
| 32 |
+
{
|
| 33 |
+
"entity_id": "master__bed__01__real_bed",
|
| 34 |
+
"room_id": "master",
|
| 35 |
+
"role": "bed",
|
| 36 |
+
"layout_slot_id": "bed"
|
| 37 |
+
},
|
| 38 |
+
{
|
| 39 |
+
"entity_id": "master__side_table__01__real_left_nightstand",
|
| 40 |
+
"room_id": "master",
|
| 41 |
+
"role": "side_table",
|
| 42 |
+
"layout_slot_id": "side_table"
|
| 43 |
+
},
|
| 44 |
+
{
|
| 45 |
+
"entity_id": "guest__bed__02__real_bed",
|
| 46 |
+
"room_id": "guest",
|
| 47 |
+
"role": "bed",
|
| 48 |
+
"layout_slot_id": "bed"
|
| 49 |
+
},
|
| 50 |
+
{
|
| 51 |
+
"entity_id": "guest__desk__02__real_wall_desk",
|
| 52 |
+
"room_id": "guest",
|
| 53 |
+
"role": "desk",
|
| 54 |
+
"layout_slot_id": "desk"
|
| 55 |
+
},
|
| 56 |
+
{
|
| 57 |
+
"entity_id": "kitchen__refrigerator__01__real_fridge_wallface",
|
| 58 |
+
"room_id": "kitchen",
|
| 59 |
+
"role": "refrigerator",
|
| 60 |
+
"layout_slot_id": "refrigerator"
|
| 61 |
+
},
|
| 62 |
+
{
|
| 63 |
+
"entity_id": "kitchen__cabinet__01__real_counter_run",
|
| 64 |
+
"room_id": "kitchen",
|
| 65 |
+
"role": "cabinet",
|
| 66 |
+
"layout_slot_id": "cabinet"
|
| 67 |
+
},
|
| 68 |
+
{
|
| 69 |
+
"entity_id": "dining__dining_table__01__real_dining_table",
|
| 70 |
+
"room_id": "dining",
|
| 71 |
+
"role": "dining_table",
|
| 72 |
+
"layout_slot_id": "dining_table"
|
| 73 |
+
},
|
| 74 |
+
{
|
| 75 |
+
"entity_id": "dining__dining_chair__02__real_ch3",
|
| 76 |
+
"room_id": "dining",
|
| 77 |
+
"role": "dining_chair",
|
| 78 |
+
"layout_slot_id": "dining_chair"
|
| 79 |
+
},
|
| 80 |
+
{
|
| 81 |
+
"entity_id": "bath__toilet__01__real_toilet_wallface",
|
| 82 |
+
"room_id": "bath",
|
| 83 |
+
"role": "toilet",
|
| 84 |
+
"layout_slot_id": "toilet"
|
| 85 |
+
},
|
| 86 |
+
{
|
| 87 |
+
"entity_id": "balcony__plant__04__balcony_plant",
|
| 88 |
+
"room_id": "balcony",
|
| 89 |
+
"role": "plant",
|
| 90 |
+
"layout_slot_id": "plant"
|
| 91 |
+
}
|
| 92 |
+
],
|
| 93 |
+
"furniture_count": 12,
|
| 94 |
+
"plan_library": "ext_libs/x_45966.json",
|
| 95 |
+
"plan_source": "rplan_production_25.json (October conversion)"
|
| 96 |
+
},
|
| 97 |
+
{
|
| 98 |
+
"id": "scene_001",
|
| 99 |
+
"k": 1,
|
| 100 |
+
"seed": 2026101601,
|
| 101 |
+
"prompt": "Generate a complete connected single-storey multi-room apartment with real-scale textured furniture, solid walls, doors and windows, about 83 square metres in total. Keep furniture inside its assigned room, avoid intersections, and preserve door access. The requested rooms and furnishings are: kitchen, containing refrigerator, cabinet; dining room, containing dining table, dining chair; bathroom, containing toilet; master bedroom, containing bed, side table; living room, containing sofa, coffee table; guest bedroom, containing bed, desk; balcony, containing plant. Furniture colours and arrangements may vary. Keep all requested rooms and furniture.",
|
| 102 |
+
"prompt_sha256": "16a6487bd2ab701d7980bf21be073c80261e7c491b7098ca9c88e74ff4ce9e22",
|
| 103 |
+
"floor_plan_id": "rplan_constrained_78215_scene_011_v16_task_contract",
|
| 104 |
+
"rplan_index": 1,
|
| 105 |
+
"target_floor_area_m2": 83,
|
| 106 |
+
"entities": [
|
| 107 |
+
{
|
| 108 |
+
"entity_id": "living__sofa__01__real_sofa",
|
| 109 |
+
"room_id": "living",
|
| 110 |
+
"role": "sofa",
|
| 111 |
+
"layout_slot_id": "sofa"
|
| 112 |
+
},
|
| 113 |
+
{
|
| 114 |
+
"entity_id": "living__coffee_table__01__real_low_coffee_table",
|
| 115 |
+
"room_id": "living",
|
| 116 |
+
"role": "coffee_table",
|
| 117 |
+
"layout_slot_id": "coffee_table"
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"entity_id": "master__bed__01__real_bed",
|
| 121 |
+
"room_id": "master",
|
| 122 |
+
"role": "bed",
|
| 123 |
+
"layout_slot_id": "bed"
|
| 124 |
+
},
|
| 125 |
+
{
|
| 126 |
+
"entity_id": "master__side_table__01__real_left_nightstand",
|
| 127 |
+
"room_id": "master",
|
| 128 |
+
"role": "side_table",
|
| 129 |
+
"layout_slot_id": "side_table"
|
| 130 |
+
},
|
| 131 |
+
{
|
| 132 |
+
"entity_id": "guest__bed__02__real_bed",
|
| 133 |
+
"room_id": "guest",
|
| 134 |
+
"role": "bed",
|
| 135 |
+
"layout_slot_id": "bed"
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"entity_id": "guest__desk__02__real_wall_desk",
|
| 139 |
+
"room_id": "guest",
|
| 140 |
+
"role": "desk",
|
| 141 |
+
"layout_slot_id": "desk"
|
| 142 |
+
},
|
| 143 |
+
{
|
| 144 |
+
"entity_id": "kitchen__refrigerator__01__real_fridge_wallface",
|
| 145 |
+
"room_id": "kitchen",
|
| 146 |
+
"role": "refrigerator",
|
| 147 |
+
"layout_slot_id": "refrigerator"
|
| 148 |
+
},
|
| 149 |
+
{
|
| 150 |
+
"entity_id": "kitchen__cabinet__01__real_counter_run",
|
| 151 |
+
"room_id": "kitchen",
|
| 152 |
+
"role": "cabinet",
|
| 153 |
+
"layout_slot_id": "cabinet"
|
| 154 |
+
},
|
| 155 |
+
{
|
| 156 |
+
"entity_id": "dining__dining_table__01__real_dining_table",
|
| 157 |
+
"room_id": "dining",
|
| 158 |
+
"role": "dining_table",
|
| 159 |
+
"layout_slot_id": "dining_table"
|
| 160 |
+
},
|
| 161 |
+
{
|
| 162 |
+
"entity_id": "dining__dining_chair__02__real_ch3",
|
| 163 |
+
"room_id": "dining",
|
| 164 |
+
"role": "dining_chair",
|
| 165 |
+
"layout_slot_id": "dining_chair"
|
| 166 |
+
},
|
| 167 |
+
{
|
| 168 |
+
"entity_id": "bath__toilet__01__real_toilet_wallface",
|
| 169 |
+
"room_id": "bath",
|
| 170 |
+
"role": "toilet",
|
| 171 |
+
"layout_slot_id": "toilet"
|
| 172 |
+
},
|
| 173 |
+
{
|
| 174 |
+
"entity_id": "balcony__plant__04__balcony_plant",
|
| 175 |
+
"room_id": "balcony",
|
| 176 |
+
"role": "plant",
|
| 177 |
+
"layout_slot_id": "plant"
|
| 178 |
+
}
|
| 179 |
+
],
|
| 180 |
+
"furniture_count": 12,
|
| 181 |
+
"plan_library": "ext_libs/x_78215.json",
|
| 182 |
+
"plan_source": "rplan_production_25.json (October conversion)"
|
| 183 |
+
},
|
| 184 |
+
{
|
| 185 |
+
"id": "scene_002",
|
| 186 |
+
"k": 2,
|
| 187 |
+
"seed": 2026101602,
|
| 188 |
+
"prompt": "Generate a complete connected single-storey multi-room apartment with real-scale textured furniture, solid walls, doors and windows, about 95 square metres in total. Keep furniture inside its assigned room, avoid intersections, and preserve door access. The requested rooms and furnishings are: kitchen, containing refrigerator, cabinet; dining room, containing dining table, dining chair; bathroom, containing toilet; master bedroom, containing bed, side table; living room, containing sofa, coffee table; guest bedroom, containing bed, desk; balcony, containing plant. Furniture colours and arrangements may vary. Keep all requested rooms and furniture.",
|
| 189 |
+
"prompt_sha256": "15f81f4fd2b50b288a238129cd505bda724d3640b2eca710a3a2864e98300d8d",
|
| 190 |
+
"floor_plan_id": "rplan_constrained_44500_scene_002_v16_task_contract",
|
| 191 |
+
"rplan_index": 2,
|
| 192 |
+
"target_floor_area_m2": 95,
|
| 193 |
+
"entities": [
|
| 194 |
+
{
|
| 195 |
+
"entity_id": "living__sofa__01__real_sofa",
|
| 196 |
+
"room_id": "living",
|
| 197 |
+
"role": "sofa",
|
| 198 |
+
"layout_slot_id": "sofa"
|
| 199 |
+
},
|
| 200 |
+
{
|
| 201 |
+
"entity_id": "living__coffee_table__01__real_low_coffee_table",
|
| 202 |
+
"room_id": "living",
|
| 203 |
+
"role": "coffee_table",
|
| 204 |
+
"layout_slot_id": "coffee_table"
|
| 205 |
+
},
|
| 206 |
+
{
|
| 207 |
+
"entity_id": "master__bed__01__real_bed",
|
| 208 |
+
"room_id": "master",
|
| 209 |
+
"role": "bed",
|
| 210 |
+
"layout_slot_id": "bed"
|
| 211 |
+
},
|
| 212 |
+
{
|
| 213 |
+
"entity_id": "master__side_table__01__real_left_nightstand",
|
| 214 |
+
"room_id": "master",
|
| 215 |
+
"role": "side_table",
|
| 216 |
+
"layout_slot_id": "side_table"
|
| 217 |
+
},
|
| 218 |
+
{
|
| 219 |
+
"entity_id": "guest__bed__02__real_bed",
|
| 220 |
+
"room_id": "guest",
|
| 221 |
+
"role": "bed",
|
| 222 |
+
"layout_slot_id": "bed"
|
| 223 |
+
},
|
| 224 |
+
{
|
| 225 |
+
"entity_id": "guest__desk__02__real_wall_desk",
|
| 226 |
+
"room_id": "guest",
|
| 227 |
+
"role": "desk",
|
| 228 |
+
"layout_slot_id": "desk"
|
| 229 |
+
},
|
| 230 |
+
{
|
| 231 |
+
"entity_id": "kitchen__refrigerator__01__real_fridge_wallface",
|
| 232 |
+
"room_id": "kitchen",
|
| 233 |
+
"role": "refrigerator",
|
| 234 |
+
"layout_slot_id": "refrigerator"
|
| 235 |
+
},
|
| 236 |
+
{
|
| 237 |
+
"entity_id": "kitchen__cabinet__01__real_counter_run",
|
| 238 |
+
"room_id": "kitchen",
|
| 239 |
+
"role": "cabinet",
|
| 240 |
+
"layout_slot_id": "cabinet"
|
| 241 |
+
},
|
| 242 |
+
{
|
| 243 |
+
"entity_id": "dining__dining_table__01__real_dining_table",
|
| 244 |
+
"room_id": "dining",
|
| 245 |
+
"role": "dining_table",
|
| 246 |
+
"layout_slot_id": "dining_table"
|
| 247 |
+
},
|
| 248 |
+
{
|
| 249 |
+
"entity_id": "dining__dining_chair__02__real_ch3",
|
| 250 |
+
"room_id": "dining",
|
| 251 |
+
"role": "dining_chair",
|
| 252 |
+
"layout_slot_id": "dining_chair"
|
| 253 |
+
},
|
| 254 |
+
{
|
| 255 |
+
"entity_id": "bath__toilet__01__real_toilet_wallface",
|
| 256 |
+
"room_id": "bath",
|
| 257 |
+
"role": "toilet",
|
| 258 |
+
"layout_slot_id": "toilet"
|
| 259 |
+
},
|
| 260 |
+
{
|
| 261 |
+
"entity_id": "balcony__plant__04__balcony_plant",
|
| 262 |
+
"room_id": "balcony",
|
| 263 |
+
"role": "plant",
|
| 264 |
+
"layout_slot_id": "plant"
|
| 265 |
+
}
|
| 266 |
+
],
|
| 267 |
+
"furniture_count": 12,
|
| 268 |
+
"plan_library": "ext_libs/x_44500.json",
|
| 269 |
+
"plan_source": "rplan_production_25.json (October conversion)"
|
| 270 |
+
},
|
| 271 |
+
{
|
| 272 |
+
"id": "scene_003",
|
| 273 |
+
"k": 3,
|
| 274 |
+
"seed": 2026101603,
|
| 275 |
+
"prompt": "Generate a complete connected single-storey multi-room apartment with real-scale textured furniture, solid walls, doors and windows, about 86 square metres in total. Keep furniture inside its assigned room, avoid intersections, and preserve door access. The requested rooms and furnishings are: kitchen, containing refrigerator, cabinet; dining room, containing dining table, dining chair; bathroom, containing toilet; master bedroom, containing bed, side table; living room, containing sofa, coffee table; guest bedroom, containing bed, desk; balcony, containing plant. Furniture colours and arrangements may vary. Keep all requested rooms and furniture.",
|
| 276 |
+
"prompt_sha256": "98171012a4f1a6aec530925e3e22b515dff8a796797fbfb396bb31871fb8837d",
|
| 277 |
+
"floor_plan_id": "rplan_constrained_24777_scene_003_v16_task_contract",
|
| 278 |
+
"rplan_index": 3,
|
| 279 |
+
"target_floor_area_m2": 86,
|
| 280 |
+
"entities": [
|
| 281 |
+
{
|
| 282 |
+
"entity_id": "living__sofa__01__real_sofa",
|
| 283 |
+
"room_id": "living",
|
| 284 |
+
"role": "sofa",
|
| 285 |
+
"layout_slot_id": "sofa"
|
| 286 |
+
},
|
| 287 |
+
{
|
| 288 |
+
"entity_id": "living__coffee_table__01__real_low_coffee_table",
|
| 289 |
+
"room_id": "living",
|
| 290 |
+
"role": "coffee_table",
|
| 291 |
+
"layout_slot_id": "coffee_table"
|
| 292 |
+
},
|
| 293 |
+
{
|
| 294 |
+
"entity_id": "master__bed__01__real_bed",
|
| 295 |
+
"room_id": "master",
|
| 296 |
+
"role": "bed",
|
| 297 |
+
"layout_slot_id": "bed"
|
| 298 |
+
},
|
| 299 |
+
{
|
| 300 |
+
"entity_id": "master__side_table__01__real_left_nightstand",
|
| 301 |
+
"room_id": "master",
|
| 302 |
+
"role": "side_table",
|
| 303 |
+
"layout_slot_id": "side_table"
|
| 304 |
+
},
|
| 305 |
+
{
|
| 306 |
+
"entity_id": "guest__bed__02__real_bed",
|
| 307 |
+
"room_id": "guest",
|
| 308 |
+
"role": "bed",
|
| 309 |
+
"layout_slot_id": "bed"
|
| 310 |
+
},
|
| 311 |
+
{
|
| 312 |
+
"entity_id": "guest__desk__02__real_wall_desk",
|
| 313 |
+
"room_id": "guest",
|
| 314 |
+
"role": "desk",
|
| 315 |
+
"layout_slot_id": "desk"
|
| 316 |
+
},
|
| 317 |
+
{
|
| 318 |
+
"entity_id": "kitchen__refrigerator__01__real_fridge_wallface",
|
| 319 |
+
"room_id": "kitchen",
|
| 320 |
+
"role": "refrigerator",
|
| 321 |
+
"layout_slot_id": "refrigerator"
|
| 322 |
+
},
|
| 323 |
+
{
|
| 324 |
+
"entity_id": "kitchen__cabinet__01__real_counter_run",
|
| 325 |
+
"room_id": "kitchen",
|
| 326 |
+
"role": "cabinet",
|
| 327 |
+
"layout_slot_id": "cabinet"
|
| 328 |
+
},
|
| 329 |
+
{
|
| 330 |
+
"entity_id": "dining__dining_table__01__real_dining_table",
|
| 331 |
+
"room_id": "dining",
|
| 332 |
+
"role": "dining_table",
|
| 333 |
+
"layout_slot_id": "dining_table"
|
| 334 |
+
},
|
| 335 |
+
{
|
| 336 |
+
"entity_id": "dining__dining_chair__02__real_ch3",
|
| 337 |
+
"room_id": "dining",
|
| 338 |
+
"role": "dining_chair",
|
| 339 |
+
"layout_slot_id": "dining_chair"
|
| 340 |
+
},
|
| 341 |
+
{
|
| 342 |
+
"entity_id": "bath__toilet__01__real_toilet_wallface",
|
| 343 |
+
"room_id": "bath",
|
| 344 |
+
"role": "toilet",
|
| 345 |
+
"layout_slot_id": "toilet"
|
| 346 |
+
},
|
| 347 |
+
{
|
| 348 |
+
"entity_id": "balcony__plant__04__balcony_plant",
|
| 349 |
+
"room_id": "balcony",
|
| 350 |
+
"role": "plant",
|
| 351 |
+
"layout_slot_id": "plant"
|
| 352 |
+
}
|
| 353 |
+
],
|
| 354 |
+
"furniture_count": 12,
|
| 355 |
+
"plan_library": "ext_libs/x_24777.json",
|
| 356 |
+
"plan_source": "rplan_production_25.json (October conversion)"
|
| 357 |
+
},
|
| 358 |
+
{
|
| 359 |
+
"id": "scene_004",
|
| 360 |
+
"k": 4,
|
| 361 |
+
"seed": 2026101604,
|
| 362 |
+
"prompt": "Generate a complete connected single-storey multi-room apartment with real-scale textured furniture, solid walls, doors and windows, about 88 square metres in total. Keep furniture inside its assigned room, avoid intersections, and preserve door access. The requested rooms and furnishings are: kitchen, containing refrigerator, cabinet; dining room, containing dining table, dining chair; bathroom, containing toilet; master bedroom, containing bed, side table; living room, containing sofa, coffee table; guest bedroom, containing bed, desk; balcony, containing plant. Furniture colours and arrangements may vary. Keep all requested rooms and furniture.",
|
| 363 |
+
"prompt_sha256": "3aa3ad025ff7677fad3f04ac1e5072917c647e2a9b86c114bd5ee407881e3cd9",
|
| 364 |
+
"floor_plan_id": "rplan_constrained_42920_scene_009_v16_task_contract",
|
| 365 |
+
"rplan_index": 4,
|
| 366 |
+
"target_floor_area_m2": 88,
|
| 367 |
+
"entities": [
|
| 368 |
+
{
|
| 369 |
+
"entity_id": "living__sofa__01__real_sofa",
|
| 370 |
+
"room_id": "living",
|
| 371 |
+
"role": "sofa",
|
| 372 |
+
"layout_slot_id": "sofa"
|
| 373 |
+
},
|
| 374 |
+
{
|
| 375 |
+
"entity_id": "living__coffee_table__01__real_low_coffee_table",
|
| 376 |
+
"room_id": "living",
|
| 377 |
+
"role": "coffee_table",
|
| 378 |
+
"layout_slot_id": "coffee_table"
|
| 379 |
+
},
|
| 380 |
+
{
|
| 381 |
+
"entity_id": "master__bed__01__real_bed",
|
| 382 |
+
"room_id": "master",
|
| 383 |
+
"role": "bed",
|
| 384 |
+
"layout_slot_id": "bed"
|
| 385 |
+
},
|
| 386 |
+
{
|
| 387 |
+
"entity_id": "master__side_table__01__real_left_nightstand",
|
| 388 |
+
"room_id": "master",
|
| 389 |
+
"role": "side_table",
|
| 390 |
+
"layout_slot_id": "side_table"
|
| 391 |
+
},
|
| 392 |
+
{
|
| 393 |
+
"entity_id": "guest__bed__02__real_bed",
|
| 394 |
+
"room_id": "guest",
|
| 395 |
+
"role": "bed",
|
| 396 |
+
"layout_slot_id": "bed"
|
| 397 |
+
},
|
| 398 |
+
{
|
| 399 |
+
"entity_id": "guest__desk__02__real_wall_desk",
|
| 400 |
+
"room_id": "guest",
|
| 401 |
+
"role": "desk",
|
| 402 |
+
"layout_slot_id": "desk"
|
| 403 |
+
},
|
| 404 |
+
{
|
| 405 |
+
"entity_id": "kitchen__refrigerator__01__real_fridge_wallface",
|
| 406 |
+
"room_id": "kitchen",
|
| 407 |
+
"role": "refrigerator",
|
| 408 |
+
"layout_slot_id": "refrigerator"
|
| 409 |
+
},
|
| 410 |
+
{
|
| 411 |
+
"entity_id": "kitchen__cabinet__01__real_counter_run",
|
| 412 |
+
"room_id": "kitchen",
|
| 413 |
+
"role": "cabinet",
|
| 414 |
+
"layout_slot_id": "cabinet"
|
| 415 |
+
},
|
| 416 |
+
{
|
| 417 |
+
"entity_id": "dining__dining_table__01__real_dining_table",
|
| 418 |
+
"room_id": "dining",
|
| 419 |
+
"role": "dining_table",
|
| 420 |
+
"layout_slot_id": "dining_table"
|
| 421 |
+
},
|
| 422 |
+
{
|
| 423 |
+
"entity_id": "dining__dining_chair__02__real_ch3",
|
| 424 |
+
"room_id": "dining",
|
| 425 |
+
"role": "dining_chair",
|
| 426 |
+
"layout_slot_id": "dining_chair"
|
| 427 |
+
},
|
| 428 |
+
{
|
| 429 |
+
"entity_id": "bath__toilet__01__real_toilet_wallface",
|
| 430 |
+
"room_id": "bath",
|
| 431 |
+
"role": "toilet",
|
| 432 |
+
"layout_slot_id": "toilet"
|
| 433 |
+
},
|
| 434 |
+
{
|
| 435 |
+
"entity_id": "balcony__plant__04__balcony_plant",
|
| 436 |
+
"room_id": "balcony",
|
| 437 |
+
"role": "plant",
|
| 438 |
+
"layout_slot_id": "plant"
|
| 439 |
+
}
|
| 440 |
+
],
|
| 441 |
+
"furniture_count": 12,
|
| 442 |
+
"plan_library": "ext_libs/x_42920.json",
|
| 443 |
+
"plan_source": "rplan_production_25.json (October conversion)"
|
| 444 |
+
},
|
| 445 |
+
{
|
| 446 |
+
"id": "scene_005",
|
| 447 |
+
"k": 5,
|
| 448 |
+
"seed": 2026101605,
|
| 449 |
+
"prompt": "Generate a complete connected single-storey multi-room apartment with real-scale textured furniture, solid walls, doors and windows, about 90 square metres in total. Keep furniture inside its assigned room, avoid intersections, and preserve door access. The requested rooms and furnishings are: kitchen, containing refrigerator, cabinet; dining room, containing dining table, dining chair; bathroom, containing toilet; master bedroom, containing bed, side table; living room, containing sofa, coffee table; guest bedroom, containing bed, desk; balcony, containing plant. Furniture colours and arrangements may vary. Keep all requested rooms and furniture.",
|
| 450 |
+
"prompt_sha256": "2baa81f896d413d459925315dea797d0cce1b96d4c9e7bbab0ddec6cf0ed7034",
|
| 451 |
+
"floor_plan_id": "rplan_graph2plan_44838",
|
| 452 |
+
"rplan_index": 5,
|
| 453 |
+
"target_floor_area_m2": 90,
|
| 454 |
+
"entities": [
|
| 455 |
+
{
|
| 456 |
+
"entity_id": "living__sofa__01__real_sofa",
|
| 457 |
+
"room_id": "living",
|
| 458 |
+
"role": "sofa",
|
| 459 |
+
"layout_slot_id": "sofa"
|
| 460 |
+
},
|
| 461 |
+
{
|
| 462 |
+
"entity_id": "living__coffee_table__01__real_low_coffee_table",
|
| 463 |
+
"room_id": "living",
|
| 464 |
+
"role": "coffee_table",
|
| 465 |
+
"layout_slot_id": "coffee_table"
|
| 466 |
+
},
|
| 467 |
+
{
|
| 468 |
+
"entity_id": "master__bed__01__real_bed",
|
| 469 |
+
"room_id": "master",
|
| 470 |
+
"role": "bed",
|
| 471 |
+
"layout_slot_id": "bed"
|
| 472 |
+
},
|
| 473 |
+
{
|
| 474 |
+
"entity_id": "master__side_table__01__real_left_nightstand",
|
| 475 |
+
"room_id": "master",
|
| 476 |
+
"role": "side_table",
|
| 477 |
+
"layout_slot_id": "side_table"
|
| 478 |
+
},
|
| 479 |
+
{
|
| 480 |
+
"entity_id": "guest__bed__02__real_bed",
|
| 481 |
+
"room_id": "guest",
|
| 482 |
+
"role": "bed",
|
| 483 |
+
"layout_slot_id": "bed"
|
| 484 |
+
},
|
| 485 |
+
{
|
| 486 |
+
"entity_id": "guest__desk__02__real_wall_desk",
|
| 487 |
+
"room_id": "guest",
|
| 488 |
+
"role": "desk",
|
| 489 |
+
"layout_slot_id": "desk"
|
| 490 |
+
},
|
| 491 |
+
{
|
| 492 |
+
"entity_id": "kitchen__refrigerator__01__real_fridge_wallface",
|
| 493 |
+
"room_id": "kitchen",
|
| 494 |
+
"role": "refrigerator",
|
| 495 |
+
"layout_slot_id": "refrigerator"
|
| 496 |
+
},
|
| 497 |
+
{
|
| 498 |
+
"entity_id": "kitchen__cabinet__01__real_counter_run",
|
| 499 |
+
"room_id": "kitchen",
|
| 500 |
+
"role": "cabinet",
|
| 501 |
+
"layout_slot_id": "cabinet"
|
| 502 |
+
},
|
| 503 |
+
{
|
| 504 |
+
"entity_id": "dining__dining_table__01__real_dining_table",
|
| 505 |
+
"room_id": "dining",
|
| 506 |
+
"role": "dining_table",
|
| 507 |
+
"layout_slot_id": "dining_table"
|
| 508 |
+
},
|
| 509 |
+
{
|
| 510 |
+
"entity_id": "dining__dining_chair__02__real_ch3",
|
| 511 |
+
"room_id": "dining",
|
| 512 |
+
"role": "dining_chair",
|
| 513 |
+
"layout_slot_id": "dining_chair"
|
| 514 |
+
},
|
| 515 |
+
{
|
| 516 |
+
"entity_id": "bath__toilet__01__real_toilet_wallface",
|
| 517 |
+
"room_id": "bath",
|
| 518 |
+
"role": "toilet",
|
| 519 |
+
"layout_slot_id": "toilet"
|
| 520 |
+
},
|
| 521 |
+
{
|
| 522 |
+
"entity_id": "balcony__plant__04__balcony_plant",
|
| 523 |
+
"room_id": "balcony",
|
| 524 |
+
"role": "plant",
|
| 525 |
+
"layout_slot_id": "plant"
|
| 526 |
+
}
|
| 527 |
+
],
|
| 528 |
+
"furniture_count": 12,
|
| 529 |
+
"plan_library": "ext_libs/x_44838.json",
|
| 530 |
+
"plan_source": "rplan_production_25.json (October conversion)"
|
| 531 |
+
},
|
| 532 |
+
{
|
| 533 |
+
"id": "scene_006",
|
| 534 |
+
"k": 6,
|
| 535 |
+
"seed": 2026101606,
|
| 536 |
+
"prompt": "Generate a complete connected single-storey multi-room apartment with real-scale textured furniture, solid walls, doors and windows, about 90 square metres in total. Keep furniture inside its assigned room, avoid intersections, and preserve door access. The requested rooms and furnishings are: kitchen, containing refrigerator, cabinet; dining room, containing dining table, dining chair; bathroom, containing toilet; master bedroom, containing bed, side table; living room, containing sofa, coffee table; guest bedroom, containing bed, desk; balcony, containing plant. Furniture colours and arrangements may vary. Keep all requested rooms and furniture.",
|
| 537 |
+
"prompt_sha256": "2baa81f896d413d459925315dea797d0cce1b96d4c9e7bbab0ddec6cf0ed7034",
|
| 538 |
+
"floor_plan_id": "rplan_graph2plan_65877",
|
| 539 |
+
"rplan_index": 6,
|
| 540 |
+
"target_floor_area_m2": 90,
|
| 541 |
+
"entities": [
|
| 542 |
+
{
|
| 543 |
+
"entity_id": "living__sofa__01__real_sofa",
|
| 544 |
+
"room_id": "living",
|
| 545 |
+
"role": "sofa",
|
| 546 |
+
"layout_slot_id": "sofa"
|
| 547 |
+
},
|
| 548 |
+
{
|
| 549 |
+
"entity_id": "living__coffee_table__01__real_low_coffee_table",
|
| 550 |
+
"room_id": "living",
|
| 551 |
+
"role": "coffee_table",
|
| 552 |
+
"layout_slot_id": "coffee_table"
|
| 553 |
+
},
|
| 554 |
+
{
|
| 555 |
+
"entity_id": "master__bed__01__real_bed",
|
| 556 |
+
"room_id": "master",
|
| 557 |
+
"role": "bed",
|
| 558 |
+
"layout_slot_id": "bed"
|
| 559 |
+
},
|
| 560 |
+
{
|
| 561 |
+
"entity_id": "master__side_table__01__real_left_nightstand",
|
| 562 |
+
"room_id": "master",
|
| 563 |
+
"role": "side_table",
|
| 564 |
+
"layout_slot_id": "side_table"
|
| 565 |
+
},
|
| 566 |
+
{
|
| 567 |
+
"entity_id": "guest__bed__02__real_bed",
|
| 568 |
+
"room_id": "guest",
|
| 569 |
+
"role": "bed",
|
| 570 |
+
"layout_slot_id": "bed"
|
| 571 |
+
},
|
| 572 |
+
{
|
| 573 |
+
"entity_id": "guest__desk__02__real_wall_desk",
|
| 574 |
+
"room_id": "guest",
|
| 575 |
+
"role": "desk",
|
| 576 |
+
"layout_slot_id": "desk"
|
| 577 |
+
},
|
| 578 |
+
{
|
| 579 |
+
"entity_id": "kitchen__refrigerator__01__real_fridge_wallface",
|
| 580 |
+
"room_id": "kitchen",
|
| 581 |
+
"role": "refrigerator",
|
| 582 |
+
"layout_slot_id": "refrigerator"
|
| 583 |
+
},
|
| 584 |
+
{
|
| 585 |
+
"entity_id": "kitchen__cabinet__01__real_counter_run",
|
| 586 |
+
"room_id": "kitchen",
|
| 587 |
+
"role": "cabinet",
|
| 588 |
+
"layout_slot_id": "cabinet"
|
| 589 |
+
},
|
| 590 |
+
{
|
| 591 |
+
"entity_id": "dining__dining_table__01__real_dining_table",
|
| 592 |
+
"room_id": "dining",
|
| 593 |
+
"role": "dining_table",
|
| 594 |
+
"layout_slot_id": "dining_table"
|
| 595 |
+
},
|
| 596 |
+
{
|
| 597 |
+
"entity_id": "dining__dining_chair__02__real_ch3",
|
| 598 |
+
"room_id": "dining",
|
| 599 |
+
"role": "dining_chair",
|
| 600 |
+
"layout_slot_id": "dining_chair"
|
| 601 |
+
},
|
| 602 |
+
{
|
| 603 |
+
"entity_id": "bath__toilet__01__real_toilet_wallface",
|
| 604 |
+
"room_id": "bath",
|
| 605 |
+
"role": "toilet",
|
| 606 |
+
"layout_slot_id": "toilet"
|
| 607 |
+
},
|
| 608 |
+
{
|
| 609 |
+
"entity_id": "balcony__plant__04__balcony_plant",
|
| 610 |
+
"room_id": "balcony",
|
| 611 |
+
"role": "plant",
|
| 612 |
+
"layout_slot_id": "plant"
|
| 613 |
+
}
|
| 614 |
+
],
|
| 615 |
+
"furniture_count": 12,
|
| 616 |
+
"plan_library": "ext_libs/x_65877.json",
|
| 617 |
+
"plan_source": "rplan_production_25.json (October conversion)"
|
| 618 |
+
},
|
| 619 |
+
{
|
| 620 |
+
"id": "scene_007",
|
| 621 |
+
"k": 7,
|
| 622 |
+
"seed": 2026101607,
|
| 623 |
+
"prompt": "Generate a complete connected single-storey multi-room apartment with real-scale textured furniture, solid walls, doors and windows, about 90 square metres in total. Keep furniture inside its assigned room, avoid intersections, and preserve door access. The requested rooms and furnishings are: kitchen, containing refrigerator, cabinet; dining room, containing dining table, dining chair; bathroom, containing toilet; master bedroom, containing bed, side table; living room, containing sofa, coffee table; guest bedroom, containing bed, desk; balcony, containing plant. Furniture colours and arrangements may vary. Keep all requested rooms and furniture.",
|
| 624 |
+
"prompt_sha256": "2baa81f896d413d459925315dea797d0cce1b96d4c9e7bbab0ddec6cf0ed7034",
|
| 625 |
+
"floor_plan_id": "rplan_graph2plan_66696",
|
| 626 |
+
"rplan_index": 7,
|
| 627 |
+
"target_floor_area_m2": 90,
|
| 628 |
+
"entities": [
|
| 629 |
+
{
|
| 630 |
+
"entity_id": "living__sofa__01__real_sofa",
|
| 631 |
+
"room_id": "living",
|
| 632 |
+
"role": "sofa",
|
| 633 |
+
"layout_slot_id": "sofa"
|
| 634 |
+
},
|
| 635 |
+
{
|
| 636 |
+
"entity_id": "living__coffee_table__01__real_low_coffee_table",
|
| 637 |
+
"room_id": "living",
|
| 638 |
+
"role": "coffee_table",
|
| 639 |
+
"layout_slot_id": "coffee_table"
|
| 640 |
+
},
|
| 641 |
+
{
|
| 642 |
+
"entity_id": "master__bed__01__real_bed",
|
| 643 |
+
"room_id": "master",
|
| 644 |
+
"role": "bed",
|
| 645 |
+
"layout_slot_id": "bed"
|
| 646 |
+
},
|
| 647 |
+
{
|
| 648 |
+
"entity_id": "master__side_table__01__real_left_nightstand",
|
| 649 |
+
"room_id": "master",
|
| 650 |
+
"role": "side_table",
|
| 651 |
+
"layout_slot_id": "side_table"
|
| 652 |
+
},
|
| 653 |
+
{
|
| 654 |
+
"entity_id": "guest__bed__02__real_bed",
|
| 655 |
+
"room_id": "guest",
|
| 656 |
+
"role": "bed",
|
| 657 |
+
"layout_slot_id": "bed"
|
| 658 |
+
},
|
| 659 |
+
{
|
| 660 |
+
"entity_id": "guest__desk__02__real_wall_desk",
|
| 661 |
+
"room_id": "guest",
|
| 662 |
+
"role": "desk",
|
| 663 |
+
"layout_slot_id": "desk"
|
| 664 |
+
},
|
| 665 |
+
{
|
| 666 |
+
"entity_id": "kitchen__refrigerator__01__real_fridge_wallface",
|
| 667 |
+
"room_id": "kitchen",
|
| 668 |
+
"role": "refrigerator",
|
| 669 |
+
"layout_slot_id": "refrigerator"
|
| 670 |
+
},
|
| 671 |
+
{
|
| 672 |
+
"entity_id": "kitchen__cabinet__01__real_counter_run",
|
| 673 |
+
"room_id": "kitchen",
|
| 674 |
+
"role": "cabinet",
|
| 675 |
+
"layout_slot_id": "cabinet"
|
| 676 |
+
},
|
| 677 |
+
{
|
| 678 |
+
"entity_id": "dining__dining_table__01__real_dining_table",
|
| 679 |
+
"room_id": "dining",
|
| 680 |
+
"role": "dining_table",
|
| 681 |
+
"layout_slot_id": "dining_table"
|
| 682 |
+
},
|
| 683 |
+
{
|
| 684 |
+
"entity_id": "dining__dining_chair__02__real_ch3",
|
| 685 |
+
"room_id": "dining",
|
| 686 |
+
"role": "dining_chair",
|
| 687 |
+
"layout_slot_id": "dining_chair"
|
| 688 |
+
},
|
| 689 |
+
{
|
| 690 |
+
"entity_id": "bath__toilet__01__real_toilet_wallface",
|
| 691 |
+
"room_id": "bath",
|
| 692 |
+
"role": "toilet",
|
| 693 |
+
"layout_slot_id": "toilet"
|
| 694 |
+
},
|
| 695 |
+
{
|
| 696 |
+
"entity_id": "balcony__plant__04__balcony_plant",
|
| 697 |
+
"room_id": "balcony",
|
| 698 |
+
"role": "plant",
|
| 699 |
+
"layout_slot_id": "plant"
|
| 700 |
+
}
|
| 701 |
+
],
|
| 702 |
+
"furniture_count": 12,
|
| 703 |
+
"plan_library": "ext_libs/x_66696.json",
|
| 704 |
+
"plan_source": "rplan_production_25.json (October conversion)"
|
| 705 |
+
},
|
| 706 |
+
{
|
| 707 |
+
"id": "scene_008",
|
| 708 |
+
"k": 8,
|
| 709 |
+
"seed": 2026101608,
|
| 710 |
+
"prompt": "Generate a complete connected single-storey multi-room apartment with real-scale textured furniture, solid walls, doors and windows, about 90 square metres in total. Keep furniture inside its assigned room, avoid intersections, and preserve door access. The requested rooms and furnishings are: kitchen, containing refrigerator, cabinet; dining room, containing dining table, dining chair; bathroom, containing toilet; master bedroom, containing bed, side table; living room, containing sofa, coffee table; guest bedroom, containing bed, desk; balcony, containing plant. Furniture colours and arrangements may vary. Keep all requested rooms and furniture.",
|
| 711 |
+
"prompt_sha256": "2baa81f896d413d459925315dea797d0cce1b96d4c9e7bbab0ddec6cf0ed7034",
|
| 712 |
+
"floor_plan_id": "rplan_graph2plan_71597",
|
| 713 |
+
"rplan_index": 8,
|
| 714 |
+
"target_floor_area_m2": 90,
|
| 715 |
+
"entities": [
|
| 716 |
+
{
|
| 717 |
+
"entity_id": "living__sofa__01__real_sofa",
|
| 718 |
+
"room_id": "living",
|
| 719 |
+
"role": "sofa",
|
| 720 |
+
"layout_slot_id": "sofa"
|
| 721 |
+
},
|
| 722 |
+
{
|
| 723 |
+
"entity_id": "living__coffee_table__01__real_low_coffee_table",
|
| 724 |
+
"room_id": "living",
|
| 725 |
+
"role": "coffee_table",
|
| 726 |
+
"layout_slot_id": "coffee_table"
|
| 727 |
+
},
|
| 728 |
+
{
|
| 729 |
+
"entity_id": "master__bed__01__real_bed",
|
| 730 |
+
"room_id": "master",
|
| 731 |
+
"role": "bed",
|
| 732 |
+
"layout_slot_id": "bed"
|
| 733 |
+
},
|
| 734 |
+
{
|
| 735 |
+
"entity_id": "master__side_table__01__real_left_nightstand",
|
| 736 |
+
"room_id": "master",
|
| 737 |
+
"role": "side_table",
|
| 738 |
+
"layout_slot_id": "side_table"
|
| 739 |
+
},
|
| 740 |
+
{
|
| 741 |
+
"entity_id": "guest__bed__02__real_bed",
|
| 742 |
+
"room_id": "guest",
|
| 743 |
+
"role": "bed",
|
| 744 |
+
"layout_slot_id": "bed"
|
| 745 |
+
},
|
| 746 |
+
{
|
| 747 |
+
"entity_id": "guest__desk__02__real_wall_desk",
|
| 748 |
+
"room_id": "guest",
|
| 749 |
+
"role": "desk",
|
| 750 |
+
"layout_slot_id": "desk"
|
| 751 |
+
},
|
| 752 |
+
{
|
| 753 |
+
"entity_id": "kitchen__refrigerator__01__real_fridge_wallface",
|
| 754 |
+
"room_id": "kitchen",
|
| 755 |
+
"role": "refrigerator",
|
| 756 |
+
"layout_slot_id": "refrigerator"
|
| 757 |
+
},
|
| 758 |
+
{
|
| 759 |
+
"entity_id": "kitchen__cabinet__01__real_counter_run",
|
| 760 |
+
"room_id": "kitchen",
|
| 761 |
+
"role": "cabinet",
|
| 762 |
+
"layout_slot_id": "cabinet"
|
| 763 |
+
},
|
| 764 |
+
{
|
| 765 |
+
"entity_id": "dining__dining_table__01__real_dining_table",
|
| 766 |
+
"room_id": "dining",
|
| 767 |
+
"role": "dining_table",
|
| 768 |
+
"layout_slot_id": "dining_table"
|
| 769 |
+
},
|
| 770 |
+
{
|
| 771 |
+
"entity_id": "dining__dining_chair__02__real_ch3",
|
| 772 |
+
"room_id": "dining",
|
| 773 |
+
"role": "dining_chair",
|
| 774 |
+
"layout_slot_id": "dining_chair"
|
| 775 |
+
},
|
| 776 |
+
{
|
| 777 |
+
"entity_id": "bath__toilet__01__real_toilet_wallface",
|
| 778 |
+
"room_id": "bath",
|
| 779 |
+
"role": "toilet",
|
| 780 |
+
"layout_slot_id": "toilet"
|
| 781 |
+
},
|
| 782 |
+
{
|
| 783 |
+
"entity_id": "balcony__plant__04__balcony_plant",
|
| 784 |
+
"room_id": "balcony",
|
| 785 |
+
"role": "plant",
|
| 786 |
+
"layout_slot_id": "plant"
|
| 787 |
+
}
|
| 788 |
+
],
|
| 789 |
+
"furniture_count": 12,
|
| 790 |
+
"plan_library": "ext_libs/x_71597.json",
|
| 791 |
+
"plan_source": "rplan_production_25.json (October conversion)"
|
| 792 |
+
},
|
| 793 |
+
{
|
| 794 |
+
"id": "scene_009",
|
| 795 |
+
"k": 9,
|
| 796 |
+
"seed": 2026101609,
|
| 797 |
+
"prompt": "Generate a complete connected single-storey multi-room apartment with real-scale textured furniture, solid walls, doors and windows, about 90 square metres in total. Keep furniture inside its assigned room, avoid intersections, and preserve door access. The requested rooms and furnishings are: kitchen, containing refrigerator, cabinet; dining room, containing dining table, dining chair; bathroom, containing toilet; master bedroom, containing bed, side table; living room, containing sofa, coffee table; guest bedroom, containing bed, desk; balcony, containing plant. Furniture colours and arrangements may vary. Keep all requested rooms and furniture.",
|
| 798 |
+
"prompt_sha256": "2baa81f896d413d459925315dea797d0cce1b96d4c9e7bbab0ddec6cf0ed7034",
|
| 799 |
+
"floor_plan_id": "rplan_graph2plan_778",
|
| 800 |
+
"rplan_index": 9,
|
| 801 |
+
"target_floor_area_m2": 90,
|
| 802 |
+
"entities": [
|
| 803 |
+
{
|
| 804 |
+
"entity_id": "living__sofa__01__real_sofa",
|
| 805 |
+
"room_id": "living",
|
| 806 |
+
"role": "sofa",
|
| 807 |
+
"layout_slot_id": "sofa"
|
| 808 |
+
},
|
| 809 |
+
{
|
| 810 |
+
"entity_id": "living__coffee_table__01__real_low_coffee_table",
|
| 811 |
+
"room_id": "living",
|
| 812 |
+
"role": "coffee_table",
|
| 813 |
+
"layout_slot_id": "coffee_table"
|
| 814 |
+
},
|
| 815 |
+
{
|
| 816 |
+
"entity_id": "master__bed__01__real_bed",
|
| 817 |
+
"room_id": "master",
|
| 818 |
+
"role": "bed",
|
| 819 |
+
"layout_slot_id": "bed"
|
| 820 |
+
},
|
| 821 |
+
{
|
| 822 |
+
"entity_id": "master__side_table__01__real_left_nightstand",
|
| 823 |
+
"room_id": "master",
|
| 824 |
+
"role": "side_table",
|
| 825 |
+
"layout_slot_id": "side_table"
|
| 826 |
+
},
|
| 827 |
+
{
|
| 828 |
+
"entity_id": "guest__bed__02__real_bed",
|
| 829 |
+
"room_id": "guest",
|
| 830 |
+
"role": "bed",
|
| 831 |
+
"layout_slot_id": "bed"
|
| 832 |
+
},
|
| 833 |
+
{
|
| 834 |
+
"entity_id": "guest__desk__02__real_wall_desk",
|
| 835 |
+
"room_id": "guest",
|
| 836 |
+
"role": "desk",
|
| 837 |
+
"layout_slot_id": "desk"
|
| 838 |
+
},
|
| 839 |
+
{
|
| 840 |
+
"entity_id": "kitchen__refrigerator__01__real_fridge_wallface",
|
| 841 |
+
"room_id": "kitchen",
|
| 842 |
+
"role": "refrigerator",
|
| 843 |
+
"layout_slot_id": "refrigerator"
|
| 844 |
+
},
|
| 845 |
+
{
|
| 846 |
+
"entity_id": "kitchen__cabinet__01__real_counter_run",
|
| 847 |
+
"room_id": "kitchen",
|
| 848 |
+
"role": "cabinet",
|
| 849 |
+
"layout_slot_id": "cabinet"
|
| 850 |
+
},
|
| 851 |
+
{
|
| 852 |
+
"entity_id": "dining__dining_table__01__real_dining_table",
|
| 853 |
+
"room_id": "dining",
|
| 854 |
+
"role": "dining_table",
|
| 855 |
+
"layout_slot_id": "dining_table"
|
| 856 |
+
},
|
| 857 |
+
{
|
| 858 |
+
"entity_id": "dining__dining_chair__02__real_ch3",
|
| 859 |
+
"room_id": "dining",
|
| 860 |
+
"role": "dining_chair",
|
| 861 |
+
"layout_slot_id": "dining_chair"
|
| 862 |
+
},
|
| 863 |
+
{
|
| 864 |
+
"entity_id": "bath__toilet__01__real_toilet_wallface",
|
| 865 |
+
"room_id": "bath",
|
| 866 |
+
"role": "toilet",
|
| 867 |
+
"layout_slot_id": "toilet"
|
| 868 |
+
},
|
| 869 |
+
{
|
| 870 |
+
"entity_id": "balcony__plant__04__balcony_plant",
|
| 871 |
+
"room_id": "balcony",
|
| 872 |
+
"role": "plant",
|
| 873 |
+
"layout_slot_id": "plant"
|
| 874 |
+
}
|
| 875 |
+
],
|
| 876 |
+
"furniture_count": 12,
|
| 877 |
+
"plan_library": "ext_libs/x_778.json",
|
| 878 |
+
"plan_source": "rplan_production_25.json (October conversion)"
|
| 879 |
+
},
|
| 880 |
+
{
|
| 881 |
+
"id": "scene_010",
|
| 882 |
+
"k": 10,
|
| 883 |
+
"seed": 2026101610,
|
| 884 |
+
"prompt": "Generate a complete connected single-storey multi-room apartment with real-scale textured furniture, solid walls, doors and windows, about 90 square metres in total. Keep furniture inside its assigned room, avoid intersections, and preserve door access. The requested rooms and furnishings are: kitchen, containing refrigerator, cabinet; dining room, containing dining table, dining chair; bathroom, containing toilet; master bedroom, containing bed, side table; living room, containing sofa, coffee table; guest bedroom, containing bed, desk; balcony, containing plant. Furniture colours and arrangements may vary. Keep all requested rooms and furniture.",
|
| 885 |
+
"prompt_sha256": "2baa81f896d413d459925315dea797d0cce1b96d4c9e7bbab0ddec6cf0ed7034",
|
| 886 |
+
"floor_plan_id": "rplan_graph2plan_7591",
|
| 887 |
+
"rplan_index": 10,
|
| 888 |
+
"target_floor_area_m2": 90,
|
| 889 |
+
"entities": [
|
| 890 |
+
{
|
| 891 |
+
"entity_id": "living__sofa__01__real_sofa",
|
| 892 |
+
"room_id": "living",
|
| 893 |
+
"role": "sofa",
|
| 894 |
+
"layout_slot_id": "sofa"
|
| 895 |
+
},
|
| 896 |
+
{
|
| 897 |
+
"entity_id": "living__coffee_table__01__real_low_coffee_table",
|
| 898 |
+
"room_id": "living",
|
| 899 |
+
"role": "coffee_table",
|
| 900 |
+
"layout_slot_id": "coffee_table"
|
| 901 |
+
},
|
| 902 |
+
{
|
| 903 |
+
"entity_id": "master__bed__01__real_bed",
|
| 904 |
+
"room_id": "master",
|
| 905 |
+
"role": "bed",
|
| 906 |
+
"layout_slot_id": "bed"
|
| 907 |
+
},
|
| 908 |
+
{
|
| 909 |
+
"entity_id": "master__side_table__01__real_left_nightstand",
|
| 910 |
+
"room_id": "master",
|
| 911 |
+
"role": "side_table",
|
| 912 |
+
"layout_slot_id": "side_table"
|
| 913 |
+
},
|
| 914 |
+
{
|
| 915 |
+
"entity_id": "guest__bed__02__real_bed",
|
| 916 |
+
"room_id": "guest",
|
| 917 |
+
"role": "bed",
|
| 918 |
+
"layout_slot_id": "bed"
|
| 919 |
+
},
|
| 920 |
+
{
|
| 921 |
+
"entity_id": "guest__desk__02__real_wall_desk",
|
| 922 |
+
"room_id": "guest",
|
| 923 |
+
"role": "desk",
|
| 924 |
+
"layout_slot_id": "desk"
|
| 925 |
+
},
|
| 926 |
+
{
|
| 927 |
+
"entity_id": "kitchen__refrigerator__01__real_fridge_wallface",
|
| 928 |
+
"room_id": "kitchen",
|
| 929 |
+
"role": "refrigerator",
|
| 930 |
+
"layout_slot_id": "refrigerator"
|
| 931 |
+
},
|
| 932 |
+
{
|
| 933 |
+
"entity_id": "kitchen__cabinet__01__real_counter_run",
|
| 934 |
+
"room_id": "kitchen",
|
| 935 |
+
"role": "cabinet",
|
| 936 |
+
"layout_slot_id": "cabinet"
|
| 937 |
+
},
|
| 938 |
+
{
|
| 939 |
+
"entity_id": "dining__dining_table__01__real_dining_table",
|
| 940 |
+
"room_id": "dining",
|
| 941 |
+
"role": "dining_table",
|
| 942 |
+
"layout_slot_id": "dining_table"
|
| 943 |
+
},
|
| 944 |
+
{
|
| 945 |
+
"entity_id": "dining__dining_chair__02__real_ch3",
|
| 946 |
+
"room_id": "dining",
|
| 947 |
+
"role": "dining_chair",
|
| 948 |
+
"layout_slot_id": "dining_chair"
|
| 949 |
+
},
|
| 950 |
+
{
|
| 951 |
+
"entity_id": "bath__toilet__01__real_toilet_wallface",
|
| 952 |
+
"room_id": "bath",
|
| 953 |
+
"role": "toilet",
|
| 954 |
+
"layout_slot_id": "toilet"
|
| 955 |
+
},
|
| 956 |
+
{
|
| 957 |
+
"entity_id": "balcony__plant__04__balcony_plant",
|
| 958 |
+
"room_id": "balcony",
|
| 959 |
+
"role": "plant",
|
| 960 |
+
"layout_slot_id": "plant"
|
| 961 |
+
}
|
| 962 |
+
],
|
| 963 |
+
"furniture_count": 12,
|
| 964 |
+
"plan_library": "ext_libs/x_7591.json",
|
| 965 |
+
"plan_source": "rplan_production_25.json (October conversion)"
|
| 966 |
+
},
|
| 967 |
+
{
|
| 968 |
+
"id": "scene_011",
|
| 969 |
+
"k": 11,
|
| 970 |
+
"seed": 2026101611,
|
| 971 |
+
"prompt": "Generate a complete connected single-storey multi-room apartment with real-scale textured furniture, solid walls, doors and windows, about 90 square metres in total. Keep furniture inside its assigned room, avoid intersections, and preserve door access. The requested rooms and furnishings are: kitchen, containing refrigerator, cabinet; dining room, containing dining table, dining chair; bathroom, containing toilet; master bedroom, containing bed, side table; living room, containing sofa, coffee table; guest bedroom, containing bed, desk; balcony, containing plant. Furniture colours and arrangements may vary. Keep all requested rooms and furniture.",
|
| 972 |
+
"prompt_sha256": "2baa81f896d413d459925315dea797d0cce1b96d4c9e7bbab0ddec6cf0ed7034",
|
| 973 |
+
"floor_plan_id": "rplan_graph2plan_7688",
|
| 974 |
+
"rplan_index": 11,
|
| 975 |
+
"target_floor_area_m2": 90,
|
| 976 |
+
"entities": [
|
| 977 |
+
{
|
| 978 |
+
"entity_id": "living__sofa__01__real_sofa",
|
| 979 |
+
"room_id": "living",
|
| 980 |
+
"role": "sofa",
|
| 981 |
+
"layout_slot_id": "sofa"
|
| 982 |
+
},
|
| 983 |
+
{
|
| 984 |
+
"entity_id": "living__coffee_table__01__real_low_coffee_table",
|
| 985 |
+
"room_id": "living",
|
| 986 |
+
"role": "coffee_table",
|
| 987 |
+
"layout_slot_id": "coffee_table"
|
| 988 |
+
},
|
| 989 |
+
{
|
| 990 |
+
"entity_id": "master__bed__01__real_bed",
|
| 991 |
+
"room_id": "master",
|
| 992 |
+
"role": "bed",
|
| 993 |
+
"layout_slot_id": "bed"
|
| 994 |
+
},
|
| 995 |
+
{
|
| 996 |
+
"entity_id": "master__side_table__01__real_left_nightstand",
|
| 997 |
+
"room_id": "master",
|
| 998 |
+
"role": "side_table",
|
| 999 |
+
"layout_slot_id": "side_table"
|
| 1000 |
+
},
|
| 1001 |
+
{
|
| 1002 |
+
"entity_id": "guest__bed__02__real_bed",
|
| 1003 |
+
"room_id": "guest",
|
| 1004 |
+
"role": "bed",
|
| 1005 |
+
"layout_slot_id": "bed"
|
| 1006 |
+
},
|
| 1007 |
+
{
|
| 1008 |
+
"entity_id": "guest__desk__02__real_wall_desk",
|
| 1009 |
+
"room_id": "guest",
|
| 1010 |
+
"role": "desk",
|
| 1011 |
+
"layout_slot_id": "desk"
|
| 1012 |
+
},
|
| 1013 |
+
{
|
| 1014 |
+
"entity_id": "kitchen__refrigerator__01__real_fridge_wallface",
|
| 1015 |
+
"room_id": "kitchen",
|
| 1016 |
+
"role": "refrigerator",
|
| 1017 |
+
"layout_slot_id": "refrigerator"
|
| 1018 |
+
},
|
| 1019 |
+
{
|
| 1020 |
+
"entity_id": "kitchen__cabinet__01__real_counter_run",
|
| 1021 |
+
"room_id": "kitchen",
|
| 1022 |
+
"role": "cabinet",
|
| 1023 |
+
"layout_slot_id": "cabinet"
|
| 1024 |
+
},
|
| 1025 |
+
{
|
| 1026 |
+
"entity_id": "dining__dining_table__01__real_dining_table",
|
| 1027 |
+
"room_id": "dining",
|
| 1028 |
+
"role": "dining_table",
|
| 1029 |
+
"layout_slot_id": "dining_table"
|
| 1030 |
+
},
|
| 1031 |
+
{
|
| 1032 |
+
"entity_id": "dining__dining_chair__02__real_ch3",
|
| 1033 |
+
"room_id": "dining",
|
| 1034 |
+
"role": "dining_chair",
|
| 1035 |
+
"layout_slot_id": "dining_chair"
|
| 1036 |
+
},
|
| 1037 |
+
{
|
| 1038 |
+
"entity_id": "bath__toilet__01__real_toilet_wallface",
|
| 1039 |
+
"room_id": "bath",
|
| 1040 |
+
"role": "toilet",
|
| 1041 |
+
"layout_slot_id": "toilet"
|
| 1042 |
+
},
|
| 1043 |
+
{
|
| 1044 |
+
"entity_id": "balcony__plant__04__balcony_plant",
|
| 1045 |
+
"room_id": "balcony",
|
| 1046 |
+
"role": "plant",
|
| 1047 |
+
"layout_slot_id": "plant"
|
| 1048 |
+
}
|
| 1049 |
+
],
|
| 1050 |
+
"furniture_count": 12,
|
| 1051 |
+
"plan_library": "ext_libs/x_7688.json",
|
| 1052 |
+
"plan_source": "rplan_production_25.json (October conversion)"
|
| 1053 |
+
},
|
| 1054 |
+
{
|
| 1055 |
+
"id": "scene_012",
|
| 1056 |
+
"k": 12,
|
| 1057 |
+
"seed": 2026101612,
|
| 1058 |
+
"prompt": "Generate a complete connected single-storey multi-room apartment with real-scale textured furniture, solid walls, doors and windows, about 90 square metres in total. Keep furniture inside its assigned room, avoid intersections, and preserve door access. The requested rooms and furnishings are: kitchen, containing refrigerator, cabinet; dining room, containing dining table, dining chair; bathroom, containing toilet; master bedroom, containing bed, side table; living room, containing sofa, coffee table; guest bedroom, containing bed, desk; balcony, containing plant. Furniture colours and arrangements may vary. Keep all requested rooms and furniture.",
|
| 1059 |
+
"prompt_sha256": "2baa81f896d413d459925315dea797d0cce1b96d4c9e7bbab0ddec6cf0ed7034",
|
| 1060 |
+
"floor_plan_id": "rplan_graph2plan_9771",
|
| 1061 |
+
"rplan_index": 12,
|
| 1062 |
+
"target_floor_area_m2": 90,
|
| 1063 |
+
"entities": [
|
| 1064 |
+
{
|
| 1065 |
+
"entity_id": "living__sofa__01__real_sofa",
|
| 1066 |
+
"room_id": "living",
|
| 1067 |
+
"role": "sofa",
|
| 1068 |
+
"layout_slot_id": "sofa"
|
| 1069 |
+
},
|
| 1070 |
+
{
|
| 1071 |
+
"entity_id": "living__coffee_table__01__real_low_coffee_table",
|
| 1072 |
+
"room_id": "living",
|
| 1073 |
+
"role": "coffee_table",
|
| 1074 |
+
"layout_slot_id": "coffee_table"
|
| 1075 |
+
},
|
| 1076 |
+
{
|
| 1077 |
+
"entity_id": "master__bed__01__real_bed",
|
| 1078 |
+
"room_id": "master",
|
| 1079 |
+
"role": "bed",
|
| 1080 |
+
"layout_slot_id": "bed"
|
| 1081 |
+
},
|
| 1082 |
+
{
|
| 1083 |
+
"entity_id": "master__side_table__01__real_left_nightstand",
|
| 1084 |
+
"room_id": "master",
|
| 1085 |
+
"role": "side_table",
|
| 1086 |
+
"layout_slot_id": "side_table"
|
| 1087 |
+
},
|
| 1088 |
+
{
|
| 1089 |
+
"entity_id": "guest__bed__02__real_bed",
|
| 1090 |
+
"room_id": "guest",
|
| 1091 |
+
"role": "bed",
|
| 1092 |
+
"layout_slot_id": "bed"
|
| 1093 |
+
},
|
| 1094 |
+
{
|
| 1095 |
+
"entity_id": "guest__desk__02__real_wall_desk",
|
| 1096 |
+
"room_id": "guest",
|
| 1097 |
+
"role": "desk",
|
| 1098 |
+
"layout_slot_id": "desk"
|
| 1099 |
+
},
|
| 1100 |
+
{
|
| 1101 |
+
"entity_id": "kitchen__refrigerator__01__real_fridge_wallface",
|
| 1102 |
+
"room_id": "kitchen",
|
| 1103 |
+
"role": "refrigerator",
|
| 1104 |
+
"layout_slot_id": "refrigerator"
|
| 1105 |
+
},
|
| 1106 |
+
{
|
| 1107 |
+
"entity_id": "kitchen__cabinet__01__real_counter_run",
|
| 1108 |
+
"room_id": "kitchen",
|
| 1109 |
+
"role": "cabinet",
|
| 1110 |
+
"layout_slot_id": "cabinet"
|
| 1111 |
+
},
|
| 1112 |
+
{
|
| 1113 |
+
"entity_id": "dining__dining_table__01__real_dining_table",
|
| 1114 |
+
"room_id": "dining",
|
| 1115 |
+
"role": "dining_table",
|
| 1116 |
+
"layout_slot_id": "dining_table"
|
| 1117 |
+
},
|
| 1118 |
+
{
|
| 1119 |
+
"entity_id": "dining__dining_chair__02__real_ch3",
|
| 1120 |
+
"room_id": "dining",
|
| 1121 |
+
"role": "dining_chair",
|
| 1122 |
+
"layout_slot_id": "dining_chair"
|
| 1123 |
+
},
|
| 1124 |
+
{
|
| 1125 |
+
"entity_id": "bath__toilet__01__real_toilet_wallface",
|
| 1126 |
+
"room_id": "bath",
|
| 1127 |
+
"role": "toilet",
|
| 1128 |
+
"layout_slot_id": "toilet"
|
| 1129 |
+
},
|
| 1130 |
+
{
|
| 1131 |
+
"entity_id": "balcony__plant__04__balcony_plant",
|
| 1132 |
+
"room_id": "balcony",
|
| 1133 |
+
"role": "plant",
|
| 1134 |
+
"layout_slot_id": "plant"
|
| 1135 |
+
}
|
| 1136 |
+
],
|
| 1137 |
+
"furniture_count": 12,
|
| 1138 |
+
"plan_library": "ext_libs/x_9771.json",
|
| 1139 |
+
"plan_source": "rplan_production_25.json (October conversion)"
|
| 1140 |
+
},
|
| 1141 |
+
{
|
| 1142 |
+
"id": "scene_013",
|
| 1143 |
+
"k": 13,
|
| 1144 |
+
"seed": 2026101613,
|
| 1145 |
+
"prompt": "Generate a complete connected single-storey multi-room apartment with real-scale textured furniture, solid walls, doors and windows, about 85 square metres in total. Keep furniture inside its assigned room, avoid intersections, and preserve door access. The requested rooms and furnishings are: kitchen, containing refrigerator, cabinet; dining room, containing dining table, dining chair; bathroom, containing toilet; master bedroom, containing bed, side table; living room, containing sofa, coffee table; guest bedroom, containing bed, desk; balcony, containing plant. Furniture colours and arrangements may vary. Keep all requested rooms and furniture.",
|
| 1146 |
+
"prompt_sha256": "030f1d4084558f435ba53d34ba45f2810a114462db03bacda9263022d572cba5",
|
| 1147 |
+
"floor_plan_id": "rplan_graph2plan_13395",
|
| 1148 |
+
"rplan_index": 13,
|
| 1149 |
+
"target_floor_area_m2": 85,
|
| 1150 |
+
"entities": [
|
| 1151 |
+
{
|
| 1152 |
+
"entity_id": "living__sofa__01__real_sofa",
|
| 1153 |
+
"room_id": "living",
|
| 1154 |
+
"role": "sofa",
|
| 1155 |
+
"layout_slot_id": "sofa"
|
| 1156 |
+
},
|
| 1157 |
+
{
|
| 1158 |
+
"entity_id": "living__coffee_table__01__real_low_coffee_table",
|
| 1159 |
+
"room_id": "living",
|
| 1160 |
+
"role": "coffee_table",
|
| 1161 |
+
"layout_slot_id": "coffee_table"
|
| 1162 |
+
},
|
| 1163 |
+
{
|
| 1164 |
+
"entity_id": "master__bed__01__real_bed",
|
| 1165 |
+
"room_id": "master",
|
| 1166 |
+
"role": "bed",
|
| 1167 |
+
"layout_slot_id": "bed"
|
| 1168 |
+
},
|
| 1169 |
+
{
|
| 1170 |
+
"entity_id": "master__side_table__01__real_left_nightstand",
|
| 1171 |
+
"room_id": "master",
|
| 1172 |
+
"role": "side_table",
|
| 1173 |
+
"layout_slot_id": "side_table"
|
| 1174 |
+
},
|
| 1175 |
+
{
|
| 1176 |
+
"entity_id": "guest__bed__02__real_bed",
|
| 1177 |
+
"room_id": "guest",
|
| 1178 |
+
"role": "bed",
|
| 1179 |
+
"layout_slot_id": "bed"
|
| 1180 |
+
},
|
| 1181 |
+
{
|
| 1182 |
+
"entity_id": "guest__desk__02__real_wall_desk",
|
| 1183 |
+
"room_id": "guest",
|
| 1184 |
+
"role": "desk",
|
| 1185 |
+
"layout_slot_id": "desk"
|
| 1186 |
+
},
|
| 1187 |
+
{
|
| 1188 |
+
"entity_id": "kitchen__refrigerator__01__real_fridge_wallface",
|
| 1189 |
+
"room_id": "kitchen",
|
| 1190 |
+
"role": "refrigerator",
|
| 1191 |
+
"layout_slot_id": "refrigerator"
|
| 1192 |
+
},
|
| 1193 |
+
{
|
| 1194 |
+
"entity_id": "kitchen__cabinet__01__real_counter_run",
|
| 1195 |
+
"room_id": "kitchen",
|
| 1196 |
+
"role": "cabinet",
|
| 1197 |
+
"layout_slot_id": "cabinet"
|
| 1198 |
+
},
|
| 1199 |
+
{
|
| 1200 |
+
"entity_id": "dining__dining_table__01__real_dining_table",
|
| 1201 |
+
"room_id": "dining",
|
| 1202 |
+
"role": "dining_table",
|
| 1203 |
+
"layout_slot_id": "dining_table"
|
| 1204 |
+
},
|
| 1205 |
+
{
|
| 1206 |
+
"entity_id": "dining__dining_chair__02__real_ch3",
|
| 1207 |
+
"room_id": "dining",
|
| 1208 |
+
"role": "dining_chair",
|
| 1209 |
+
"layout_slot_id": "dining_chair"
|
| 1210 |
+
},
|
| 1211 |
+
{
|
| 1212 |
+
"entity_id": "bath__toilet__01__real_toilet_wallface",
|
| 1213 |
+
"room_id": "bath",
|
| 1214 |
+
"role": "toilet",
|
| 1215 |
+
"layout_slot_id": "toilet"
|
| 1216 |
+
},
|
| 1217 |
+
{
|
| 1218 |
+
"entity_id": "balcony__plant__04__balcony_plant",
|
| 1219 |
+
"room_id": "balcony",
|
| 1220 |
+
"role": "plant",
|
| 1221 |
+
"layout_slot_id": "plant"
|
| 1222 |
+
}
|
| 1223 |
+
],
|
| 1224 |
+
"furniture_count": 12,
|
| 1225 |
+
"plan_library": "ext_libs/x_13395.json",
|
| 1226 |
+
"plan_source": "rplan_production_25.json (October conversion)"
|
| 1227 |
+
},
|
| 1228 |
+
{
|
| 1229 |
+
"id": "scene_014",
|
| 1230 |
+
"k": 14,
|
| 1231 |
+
"seed": 2026101614,
|
| 1232 |
+
"prompt": "Generate a complete connected single-storey multi-room apartment with real-scale textured furniture, solid walls, doors and windows, about 83 square metres in total. Keep furniture inside its assigned room, avoid intersections, and preserve door access. The requested rooms and furnishings are: kitchen, containing refrigerator, cabinet; dining room, containing dining table, dining chair; bathroom, containing toilet; master bedroom, containing bed, side table; living room, containing sofa, coffee table; guest bedroom, containing bed, desk; balcony, containing plant. Furniture colours and arrangements may vary. Keep all requested rooms and furniture.",
|
| 1233 |
+
"prompt_sha256": "16a6487bd2ab701d7980bf21be073c80261e7c491b7098ca9c88e74ff4ce9e22",
|
| 1234 |
+
"floor_plan_id": "rplan_graph2plan_14143",
|
| 1235 |
+
"rplan_index": 14,
|
| 1236 |
+
"target_floor_area_m2": 83,
|
| 1237 |
+
"entities": [
|
| 1238 |
+
{
|
| 1239 |
+
"entity_id": "living__sofa__01__real_sofa",
|
| 1240 |
+
"room_id": "living",
|
| 1241 |
+
"role": "sofa",
|
| 1242 |
+
"layout_slot_id": "sofa"
|
| 1243 |
+
},
|
| 1244 |
+
{
|
| 1245 |
+
"entity_id": "living__coffee_table__01__real_low_coffee_table",
|
| 1246 |
+
"room_id": "living",
|
| 1247 |
+
"role": "coffee_table",
|
| 1248 |
+
"layout_slot_id": "coffee_table"
|
| 1249 |
+
},
|
| 1250 |
+
{
|
| 1251 |
+
"entity_id": "master__bed__01__real_bed",
|
| 1252 |
+
"room_id": "master",
|
| 1253 |
+
"role": "bed",
|
| 1254 |
+
"layout_slot_id": "bed"
|
| 1255 |
+
},
|
| 1256 |
+
{
|
| 1257 |
+
"entity_id": "master__side_table__01__real_left_nightstand",
|
| 1258 |
+
"room_id": "master",
|
| 1259 |
+
"role": "side_table",
|
| 1260 |
+
"layout_slot_id": "side_table"
|
| 1261 |
+
},
|
| 1262 |
+
{
|
| 1263 |
+
"entity_id": "guest__bed__02__real_bed",
|
| 1264 |
+
"room_id": "guest",
|
| 1265 |
+
"role": "bed",
|
| 1266 |
+
"layout_slot_id": "bed"
|
| 1267 |
+
},
|
| 1268 |
+
{
|
| 1269 |
+
"entity_id": "guest__desk__02__real_wall_desk",
|
| 1270 |
+
"room_id": "guest",
|
| 1271 |
+
"role": "desk",
|
| 1272 |
+
"layout_slot_id": "desk"
|
| 1273 |
+
},
|
| 1274 |
+
{
|
| 1275 |
+
"entity_id": "kitchen__refrigerator__01__real_fridge_wallface",
|
| 1276 |
+
"room_id": "kitchen",
|
| 1277 |
+
"role": "refrigerator",
|
| 1278 |
+
"layout_slot_id": "refrigerator"
|
| 1279 |
+
},
|
| 1280 |
+
{
|
| 1281 |
+
"entity_id": "kitchen__cabinet__01__real_counter_run",
|
| 1282 |
+
"room_id": "kitchen",
|
| 1283 |
+
"role": "cabinet",
|
| 1284 |
+
"layout_slot_id": "cabinet"
|
| 1285 |
+
},
|
| 1286 |
+
{
|
| 1287 |
+
"entity_id": "dining__dining_table__01__real_dining_table",
|
| 1288 |
+
"room_id": "dining",
|
| 1289 |
+
"role": "dining_table",
|
| 1290 |
+
"layout_slot_id": "dining_table"
|
| 1291 |
+
},
|
| 1292 |
+
{
|
| 1293 |
+
"entity_id": "dining__dining_chair__02__real_ch3",
|
| 1294 |
+
"room_id": "dining",
|
| 1295 |
+
"role": "dining_chair",
|
| 1296 |
+
"layout_slot_id": "dining_chair"
|
| 1297 |
+
},
|
| 1298 |
+
{
|
| 1299 |
+
"entity_id": "bath__toilet__01__real_toilet_wallface",
|
| 1300 |
+
"room_id": "bath",
|
| 1301 |
+
"role": "toilet",
|
| 1302 |
+
"layout_slot_id": "toilet"
|
| 1303 |
+
},
|
| 1304 |
+
{
|
| 1305 |
+
"entity_id": "balcony__plant__04__balcony_plant",
|
| 1306 |
+
"room_id": "balcony",
|
| 1307 |
+
"role": "plant",
|
| 1308 |
+
"layout_slot_id": "plant"
|
| 1309 |
+
}
|
| 1310 |
+
],
|
| 1311 |
+
"furniture_count": 12,
|
| 1312 |
+
"plan_library": "ext_libs/x_14143.json",
|
| 1313 |
+
"plan_source": "rplan_production_25.json (October conversion)"
|
| 1314 |
+
},
|
| 1315 |
+
{
|
| 1316 |
+
"id": "scene_015",
|
| 1317 |
+
"k": 15,
|
| 1318 |
+
"seed": 2026101615,
|
| 1319 |
+
"prompt": "Generate a complete connected single-storey multi-room apartment with real-scale textured furniture, solid walls, doors and windows, about 90 square metres in total. Keep furniture inside its assigned room, avoid intersections, and preserve door access. The requested rooms and furnishings are: kitchen, containing refrigerator, cabinet; dining room, containing dining table, dining chair; bathroom, containing toilet; master bedroom, containing bed, side table; living room, containing sofa, coffee table; guest bedroom, containing bed, desk; balcony, containing plant. Furniture colours and arrangements may vary. Keep all requested rooms and furniture.",
|
| 1320 |
+
"prompt_sha256": "2baa81f896d413d459925315dea797d0cce1b96d4c9e7bbab0ddec6cf0ed7034",
|
| 1321 |
+
"floor_plan_id": "rplan_graph2plan_14903",
|
| 1322 |
+
"rplan_index": 15,
|
| 1323 |
+
"target_floor_area_m2": 90,
|
| 1324 |
+
"entities": [
|
| 1325 |
+
{
|
| 1326 |
+
"entity_id": "living__sofa__01__real_sofa",
|
| 1327 |
+
"room_id": "living",
|
| 1328 |
+
"role": "sofa",
|
| 1329 |
+
"layout_slot_id": "sofa"
|
| 1330 |
+
},
|
| 1331 |
+
{
|
| 1332 |
+
"entity_id": "living__coffee_table__01__real_low_coffee_table",
|
| 1333 |
+
"room_id": "living",
|
| 1334 |
+
"role": "coffee_table",
|
| 1335 |
+
"layout_slot_id": "coffee_table"
|
| 1336 |
+
},
|
| 1337 |
+
{
|
| 1338 |
+
"entity_id": "master__bed__01__real_bed",
|
| 1339 |
+
"room_id": "master",
|
| 1340 |
+
"role": "bed",
|
| 1341 |
+
"layout_slot_id": "bed"
|
| 1342 |
+
},
|
| 1343 |
+
{
|
| 1344 |
+
"entity_id": "master__side_table__01__real_left_nightstand",
|
| 1345 |
+
"room_id": "master",
|
| 1346 |
+
"role": "side_table",
|
| 1347 |
+
"layout_slot_id": "side_table"
|
| 1348 |
+
},
|
| 1349 |
+
{
|
| 1350 |
+
"entity_id": "guest__bed__02__real_bed",
|
| 1351 |
+
"room_id": "guest",
|
| 1352 |
+
"role": "bed",
|
| 1353 |
+
"layout_slot_id": "bed"
|
| 1354 |
+
},
|
| 1355 |
+
{
|
| 1356 |
+
"entity_id": "guest__desk__02__real_wall_desk",
|
| 1357 |
+
"room_id": "guest",
|
| 1358 |
+
"role": "desk",
|
| 1359 |
+
"layout_slot_id": "desk"
|
| 1360 |
+
},
|
| 1361 |
+
{
|
| 1362 |
+
"entity_id": "kitchen__refrigerator__01__real_fridge_wallface",
|
| 1363 |
+
"room_id": "kitchen",
|
| 1364 |
+
"role": "refrigerator",
|
| 1365 |
+
"layout_slot_id": "refrigerator"
|
| 1366 |
+
},
|
| 1367 |
+
{
|
| 1368 |
+
"entity_id": "kitchen__cabinet__01__real_counter_run",
|
| 1369 |
+
"room_id": "kitchen",
|
| 1370 |
+
"role": "cabinet",
|
| 1371 |
+
"layout_slot_id": "cabinet"
|
| 1372 |
+
},
|
| 1373 |
+
{
|
| 1374 |
+
"entity_id": "dining__dining_table__01__real_dining_table",
|
| 1375 |
+
"room_id": "dining",
|
| 1376 |
+
"role": "dining_table",
|
| 1377 |
+
"layout_slot_id": "dining_table"
|
| 1378 |
+
},
|
| 1379 |
+
{
|
| 1380 |
+
"entity_id": "dining__dining_chair__02__real_ch3",
|
| 1381 |
+
"room_id": "dining",
|
| 1382 |
+
"role": "dining_chair",
|
| 1383 |
+
"layout_slot_id": "dining_chair"
|
| 1384 |
+
},
|
| 1385 |
+
{
|
| 1386 |
+
"entity_id": "bath__toilet__01__real_toilet_wallface",
|
| 1387 |
+
"room_id": "bath",
|
| 1388 |
+
"role": "toilet",
|
| 1389 |
+
"layout_slot_id": "toilet"
|
| 1390 |
+
},
|
| 1391 |
+
{
|
| 1392 |
+
"entity_id": "balcony__plant__04__balcony_plant",
|
| 1393 |
+
"room_id": "balcony",
|
| 1394 |
+
"role": "plant",
|
| 1395 |
+
"layout_slot_id": "plant"
|
| 1396 |
+
}
|
| 1397 |
+
],
|
| 1398 |
+
"furniture_count": 12,
|
| 1399 |
+
"plan_library": "ext_libs/x_14903.json",
|
| 1400 |
+
"plan_source": "rplan_production_25.json (October conversion)"
|
| 1401 |
+
},
|
| 1402 |
+
{
|
| 1403 |
+
"id": "scene_016",
|
| 1404 |
+
"k": 16,
|
| 1405 |
+
"seed": 2026101616,
|
| 1406 |
+
"prompt": "Generate a complete connected single-storey multi-room apartment with real-scale textured furniture, solid walls, doors and windows, about 85 square metres in total. Keep furniture inside its assigned room, avoid intersections, and preserve door access. The requested rooms and furnishings are: kitchen, containing refrigerator, cabinet; dining room, containing dining table, dining chair; bathroom, containing toilet; master bedroom, containing bed, side table; living room, containing sofa, coffee table; guest bedroom, containing bed, desk; balcony, containing plant. Furniture colours and arrangements may vary. Keep all requested rooms and furniture.",
|
| 1407 |
+
"prompt_sha256": "030f1d4084558f435ba53d34ba45f2810a114462db03bacda9263022d572cba5",
|
| 1408 |
+
"floor_plan_id": "rplan_graph2plan_19207",
|
| 1409 |
+
"rplan_index": 16,
|
| 1410 |
+
"target_floor_area_m2": 85,
|
| 1411 |
+
"entities": [
|
| 1412 |
+
{
|
| 1413 |
+
"entity_id": "living__sofa__01__real_sofa",
|
| 1414 |
+
"room_id": "living",
|
| 1415 |
+
"role": "sofa",
|
| 1416 |
+
"layout_slot_id": "sofa"
|
| 1417 |
+
},
|
| 1418 |
+
{
|
| 1419 |
+
"entity_id": "living__coffee_table__01__real_low_coffee_table",
|
| 1420 |
+
"room_id": "living",
|
| 1421 |
+
"role": "coffee_table",
|
| 1422 |
+
"layout_slot_id": "coffee_table"
|
| 1423 |
+
},
|
| 1424 |
+
{
|
| 1425 |
+
"entity_id": "master__bed__01__real_bed",
|
| 1426 |
+
"room_id": "master",
|
| 1427 |
+
"role": "bed",
|
| 1428 |
+
"layout_slot_id": "bed"
|
| 1429 |
+
},
|
| 1430 |
+
{
|
| 1431 |
+
"entity_id": "master__side_table__01__real_left_nightstand",
|
| 1432 |
+
"room_id": "master",
|
| 1433 |
+
"role": "side_table",
|
| 1434 |
+
"layout_slot_id": "side_table"
|
| 1435 |
+
},
|
| 1436 |
+
{
|
| 1437 |
+
"entity_id": "guest__bed__02__real_bed",
|
| 1438 |
+
"room_id": "guest",
|
| 1439 |
+
"role": "bed",
|
| 1440 |
+
"layout_slot_id": "bed"
|
| 1441 |
+
},
|
| 1442 |
+
{
|
| 1443 |
+
"entity_id": "guest__desk__02__real_wall_desk",
|
| 1444 |
+
"room_id": "guest",
|
| 1445 |
+
"role": "desk",
|
| 1446 |
+
"layout_slot_id": "desk"
|
| 1447 |
+
},
|
| 1448 |
+
{
|
| 1449 |
+
"entity_id": "kitchen__refrigerator__01__real_fridge_wallface",
|
| 1450 |
+
"room_id": "kitchen",
|
| 1451 |
+
"role": "refrigerator",
|
| 1452 |
+
"layout_slot_id": "refrigerator"
|
| 1453 |
+
},
|
| 1454 |
+
{
|
| 1455 |
+
"entity_id": "kitchen__cabinet__01__real_counter_run",
|
| 1456 |
+
"room_id": "kitchen",
|
| 1457 |
+
"role": "cabinet",
|
| 1458 |
+
"layout_slot_id": "cabinet"
|
| 1459 |
+
},
|
| 1460 |
+
{
|
| 1461 |
+
"entity_id": "dining__dining_table__01__real_dining_table",
|
| 1462 |
+
"room_id": "dining",
|
| 1463 |
+
"role": "dining_table",
|
| 1464 |
+
"layout_slot_id": "dining_table"
|
| 1465 |
+
},
|
| 1466 |
+
{
|
| 1467 |
+
"entity_id": "dining__dining_chair__02__real_ch3",
|
| 1468 |
+
"room_id": "dining",
|
| 1469 |
+
"role": "dining_chair",
|
| 1470 |
+
"layout_slot_id": "dining_chair"
|
| 1471 |
+
},
|
| 1472 |
+
{
|
| 1473 |
+
"entity_id": "bath__toilet__01__real_toilet_wallface",
|
| 1474 |
+
"room_id": "bath",
|
| 1475 |
+
"role": "toilet",
|
| 1476 |
+
"layout_slot_id": "toilet"
|
| 1477 |
+
},
|
| 1478 |
+
{
|
| 1479 |
+
"entity_id": "balcony__plant__04__balcony_plant",
|
| 1480 |
+
"room_id": "balcony",
|
| 1481 |
+
"role": "plant",
|
| 1482 |
+
"layout_slot_id": "plant"
|
| 1483 |
+
}
|
| 1484 |
+
],
|
| 1485 |
+
"furniture_count": 12,
|
| 1486 |
+
"plan_library": "ext_libs/x_19207.json",
|
| 1487 |
+
"plan_source": "rplan_production_25.json (October conversion)"
|
| 1488 |
+
},
|
| 1489 |
+
{
|
| 1490 |
+
"id": "scene_017",
|
| 1491 |
+
"k": 17,
|
| 1492 |
+
"seed": 2026101617,
|
| 1493 |
+
"prompt": "Generate a complete connected single-storey multi-room apartment with real-scale textured furniture, solid walls, doors and windows, about 90 square metres in total. Keep furniture inside its assigned room, avoid intersections, and preserve door access. The requested rooms and furnishings are: kitchen, containing refrigerator, cabinet; dining room, containing dining table, dining chair; bathroom, containing toilet; master bedroom, containing bed, side table; living room, containing sofa, coffee table; guest bedroom, containing bed, desk; balcony, containing plant. Furniture colours and arrangements may vary. Keep all requested rooms and furniture.",
|
| 1494 |
+
"prompt_sha256": "2baa81f896d413d459925315dea797d0cce1b96d4c9e7bbab0ddec6cf0ed7034",
|
| 1495 |
+
"floor_plan_id": "rplan_graph2plan_24727",
|
| 1496 |
+
"rplan_index": 17,
|
| 1497 |
+
"target_floor_area_m2": 90,
|
| 1498 |
+
"entities": [
|
| 1499 |
+
{
|
| 1500 |
+
"entity_id": "living__sofa__01__real_sofa",
|
| 1501 |
+
"room_id": "living",
|
| 1502 |
+
"role": "sofa",
|
| 1503 |
+
"layout_slot_id": "sofa"
|
| 1504 |
+
},
|
| 1505 |
+
{
|
| 1506 |
+
"entity_id": "living__coffee_table__01__real_low_coffee_table",
|
| 1507 |
+
"room_id": "living",
|
| 1508 |
+
"role": "coffee_table",
|
| 1509 |
+
"layout_slot_id": "coffee_table"
|
| 1510 |
+
},
|
| 1511 |
+
{
|
| 1512 |
+
"entity_id": "master__bed__01__real_bed",
|
| 1513 |
+
"room_id": "master",
|
| 1514 |
+
"role": "bed",
|
| 1515 |
+
"layout_slot_id": "bed"
|
| 1516 |
+
},
|
| 1517 |
+
{
|
| 1518 |
+
"entity_id": "master__side_table__01__real_left_nightstand",
|
| 1519 |
+
"room_id": "master",
|
| 1520 |
+
"role": "side_table",
|
| 1521 |
+
"layout_slot_id": "side_table"
|
| 1522 |
+
},
|
| 1523 |
+
{
|
| 1524 |
+
"entity_id": "guest__bed__02__real_bed",
|
| 1525 |
+
"room_id": "guest",
|
| 1526 |
+
"role": "bed",
|
| 1527 |
+
"layout_slot_id": "bed"
|
| 1528 |
+
},
|
| 1529 |
+
{
|
| 1530 |
+
"entity_id": "guest__desk__02__real_wall_desk",
|
| 1531 |
+
"room_id": "guest",
|
| 1532 |
+
"role": "desk",
|
| 1533 |
+
"layout_slot_id": "desk"
|
| 1534 |
+
},
|
| 1535 |
+
{
|
| 1536 |
+
"entity_id": "kitchen__refrigerator__01__real_fridge_wallface",
|
| 1537 |
+
"room_id": "kitchen",
|
| 1538 |
+
"role": "refrigerator",
|
| 1539 |
+
"layout_slot_id": "refrigerator"
|
| 1540 |
+
},
|
| 1541 |
+
{
|
| 1542 |
+
"entity_id": "kitchen__cabinet__01__real_counter_run",
|
| 1543 |
+
"room_id": "kitchen",
|
| 1544 |
+
"role": "cabinet",
|
| 1545 |
+
"layout_slot_id": "cabinet"
|
| 1546 |
+
},
|
| 1547 |
+
{
|
| 1548 |
+
"entity_id": "dining__dining_table__01__real_dining_table",
|
| 1549 |
+
"room_id": "dining",
|
| 1550 |
+
"role": "dining_table",
|
| 1551 |
+
"layout_slot_id": "dining_table"
|
| 1552 |
+
},
|
| 1553 |
+
{
|
| 1554 |
+
"entity_id": "dining__dining_chair__02__real_ch3",
|
| 1555 |
+
"room_id": "dining",
|
| 1556 |
+
"role": "dining_chair",
|
| 1557 |
+
"layout_slot_id": "dining_chair"
|
| 1558 |
+
},
|
| 1559 |
+
{
|
| 1560 |
+
"entity_id": "bath__toilet__01__real_toilet_wallface",
|
| 1561 |
+
"room_id": "bath",
|
| 1562 |
+
"role": "toilet",
|
| 1563 |
+
"layout_slot_id": "toilet"
|
| 1564 |
+
},
|
| 1565 |
+
{
|
| 1566 |
+
"entity_id": "balcony__plant__04__balcony_plant",
|
| 1567 |
+
"room_id": "balcony",
|
| 1568 |
+
"role": "plant",
|
| 1569 |
+
"layout_slot_id": "plant"
|
| 1570 |
+
}
|
| 1571 |
+
],
|
| 1572 |
+
"furniture_count": 12,
|
| 1573 |
+
"plan_library": "ext_libs/x_24727.json",
|
| 1574 |
+
"plan_source": "rplan_production_25.json (October conversion)"
|
| 1575 |
+
},
|
| 1576 |
+
{
|
| 1577 |
+
"id": "scene_018",
|
| 1578 |
+
"k": 18,
|
| 1579 |
+
"seed": 2026101618,
|
| 1580 |
+
"prompt": "Generate a complete connected single-storey multi-room apartment with real-scale textured furniture, solid walls, doors and windows, about 90 square metres in total. Keep furniture inside its assigned room, avoid intersections, and preserve door access. The requested rooms and furnishings are: kitchen, containing refrigerator, cabinet; dining room, containing dining table, dining chair; bathroom, containing toilet; master bedroom, containing bed, side table; living room, containing sofa, coffee table; guest bedroom, containing bed, desk; balcony, containing plant. Furniture colours and arrangements may vary. Keep all requested rooms and furniture.",
|
| 1581 |
+
"prompt_sha256": "2baa81f896d413d459925315dea797d0cce1b96d4c9e7bbab0ddec6cf0ed7034",
|
| 1582 |
+
"floor_plan_id": "rplan_graph2plan_26376",
|
| 1583 |
+
"rplan_index": 18,
|
| 1584 |
+
"target_floor_area_m2": 90,
|
| 1585 |
+
"entities": [
|
| 1586 |
+
{
|
| 1587 |
+
"entity_id": "living__sofa__01__real_sofa",
|
| 1588 |
+
"room_id": "living",
|
| 1589 |
+
"role": "sofa",
|
| 1590 |
+
"layout_slot_id": "sofa"
|
| 1591 |
+
},
|
| 1592 |
+
{
|
| 1593 |
+
"entity_id": "living__coffee_table__01__real_low_coffee_table",
|
| 1594 |
+
"room_id": "living",
|
| 1595 |
+
"role": "coffee_table",
|
| 1596 |
+
"layout_slot_id": "coffee_table"
|
| 1597 |
+
},
|
| 1598 |
+
{
|
| 1599 |
+
"entity_id": "master__bed__01__real_bed",
|
| 1600 |
+
"room_id": "master",
|
| 1601 |
+
"role": "bed",
|
| 1602 |
+
"layout_slot_id": "bed"
|
| 1603 |
+
},
|
| 1604 |
+
{
|
| 1605 |
+
"entity_id": "master__side_table__01__real_left_nightstand",
|
| 1606 |
+
"room_id": "master",
|
| 1607 |
+
"role": "side_table",
|
| 1608 |
+
"layout_slot_id": "side_table"
|
| 1609 |
+
},
|
| 1610 |
+
{
|
| 1611 |
+
"entity_id": "guest__bed__02__real_bed",
|
| 1612 |
+
"room_id": "guest",
|
| 1613 |
+
"role": "bed",
|
| 1614 |
+
"layout_slot_id": "bed"
|
| 1615 |
+
},
|
| 1616 |
+
{
|
| 1617 |
+
"entity_id": "guest__desk__02__real_wall_desk",
|
| 1618 |
+
"room_id": "guest",
|
| 1619 |
+
"role": "desk",
|
| 1620 |
+
"layout_slot_id": "desk"
|
| 1621 |
+
},
|
| 1622 |
+
{
|
| 1623 |
+
"entity_id": "kitchen__refrigerator__01__real_fridge_wallface",
|
| 1624 |
+
"room_id": "kitchen",
|
| 1625 |
+
"role": "refrigerator",
|
| 1626 |
+
"layout_slot_id": "refrigerator"
|
| 1627 |
+
},
|
| 1628 |
+
{
|
| 1629 |
+
"entity_id": "kitchen__cabinet__01__real_counter_run",
|
| 1630 |
+
"room_id": "kitchen",
|
| 1631 |
+
"role": "cabinet",
|
| 1632 |
+
"layout_slot_id": "cabinet"
|
| 1633 |
+
},
|
| 1634 |
+
{
|
| 1635 |
+
"entity_id": "dining__dining_table__01__real_dining_table",
|
| 1636 |
+
"room_id": "dining",
|
| 1637 |
+
"role": "dining_table",
|
| 1638 |
+
"layout_slot_id": "dining_table"
|
| 1639 |
+
},
|
| 1640 |
+
{
|
| 1641 |
+
"entity_id": "dining__dining_chair__02__real_ch3",
|
| 1642 |
+
"room_id": "dining",
|
| 1643 |
+
"role": "dining_chair",
|
| 1644 |
+
"layout_slot_id": "dining_chair"
|
| 1645 |
+
},
|
| 1646 |
+
{
|
| 1647 |
+
"entity_id": "bath__toilet__01__real_toilet_wallface",
|
| 1648 |
+
"room_id": "bath",
|
| 1649 |
+
"role": "toilet",
|
| 1650 |
+
"layout_slot_id": "toilet"
|
| 1651 |
+
},
|
| 1652 |
+
{
|
| 1653 |
+
"entity_id": "balcony__plant__04__balcony_plant",
|
| 1654 |
+
"room_id": "balcony",
|
| 1655 |
+
"role": "plant",
|
| 1656 |
+
"layout_slot_id": "plant"
|
| 1657 |
+
}
|
| 1658 |
+
],
|
| 1659 |
+
"furniture_count": 12,
|
| 1660 |
+
"plan_library": "ext_libs/x_26376.json",
|
| 1661 |
+
"plan_source": "full_v8_balanced/hall.screened.json (new converter; plan dropped from production library for a door defect)"
|
| 1662 |
+
},
|
| 1663 |
+
{
|
| 1664 |
+
"id": "scene_019",
|
| 1665 |
+
"k": 19,
|
| 1666 |
+
"seed": 2026101619,
|
| 1667 |
+
"prompt": "Generate a complete connected single-storey multi-room apartment with real-scale textured furniture, solid walls, doors and windows, about 90 square metres in total. Keep furniture inside its assigned room, avoid intersections, and preserve door access. The requested rooms and furnishings are: kitchen, containing refrigerator, cabinet; dining room, containing dining table, dining chair; bathroom, containing toilet; master bedroom, containing bed, side table; living room, containing sofa, coffee table; guest bedroom, containing bed, desk; balcony, containing plant. Furniture colours and arrangements may vary. Keep all requested rooms and furniture.",
|
| 1668 |
+
"prompt_sha256": "2baa81f896d413d459925315dea797d0cce1b96d4c9e7bbab0ddec6cf0ed7034",
|
| 1669 |
+
"floor_plan_id": "rplan_graph2plan_28571",
|
| 1670 |
+
"rplan_index": 19,
|
| 1671 |
+
"target_floor_area_m2": 90,
|
| 1672 |
+
"entities": [
|
| 1673 |
+
{
|
| 1674 |
+
"entity_id": "living__sofa__01__real_sofa",
|
| 1675 |
+
"room_id": "living",
|
| 1676 |
+
"role": "sofa",
|
| 1677 |
+
"layout_slot_id": "sofa"
|
| 1678 |
+
},
|
| 1679 |
+
{
|
| 1680 |
+
"entity_id": "living__coffee_table__01__real_low_coffee_table",
|
| 1681 |
+
"room_id": "living",
|
| 1682 |
+
"role": "coffee_table",
|
| 1683 |
+
"layout_slot_id": "coffee_table"
|
| 1684 |
+
},
|
| 1685 |
+
{
|
| 1686 |
+
"entity_id": "master__bed__01__real_bed",
|
| 1687 |
+
"room_id": "master",
|
| 1688 |
+
"role": "bed",
|
| 1689 |
+
"layout_slot_id": "bed"
|
| 1690 |
+
},
|
| 1691 |
+
{
|
| 1692 |
+
"entity_id": "master__side_table__01__real_left_nightstand",
|
| 1693 |
+
"room_id": "master",
|
| 1694 |
+
"role": "side_table",
|
| 1695 |
+
"layout_slot_id": "side_table"
|
| 1696 |
+
},
|
| 1697 |
+
{
|
| 1698 |
+
"entity_id": "guest__bed__02__real_bed",
|
| 1699 |
+
"room_id": "guest",
|
| 1700 |
+
"role": "bed",
|
| 1701 |
+
"layout_slot_id": "bed"
|
| 1702 |
+
},
|
| 1703 |
+
{
|
| 1704 |
+
"entity_id": "guest__desk__02__real_wall_desk",
|
| 1705 |
+
"room_id": "guest",
|
| 1706 |
+
"role": "desk",
|
| 1707 |
+
"layout_slot_id": "desk"
|
| 1708 |
+
},
|
| 1709 |
+
{
|
| 1710 |
+
"entity_id": "kitchen__refrigerator__01__real_fridge_wallface",
|
| 1711 |
+
"room_id": "kitchen",
|
| 1712 |
+
"role": "refrigerator",
|
| 1713 |
+
"layout_slot_id": "refrigerator"
|
| 1714 |
+
},
|
| 1715 |
+
{
|
| 1716 |
+
"entity_id": "kitchen__cabinet__01__real_counter_run",
|
| 1717 |
+
"room_id": "kitchen",
|
| 1718 |
+
"role": "cabinet",
|
| 1719 |
+
"layout_slot_id": "cabinet"
|
| 1720 |
+
},
|
| 1721 |
+
{
|
| 1722 |
+
"entity_id": "dining__dining_table__01__real_dining_table",
|
| 1723 |
+
"room_id": "dining",
|
| 1724 |
+
"role": "dining_table",
|
| 1725 |
+
"layout_slot_id": "dining_table"
|
| 1726 |
+
},
|
| 1727 |
+
{
|
| 1728 |
+
"entity_id": "dining__dining_chair__02__real_ch3",
|
| 1729 |
+
"room_id": "dining",
|
| 1730 |
+
"role": "dining_chair",
|
| 1731 |
+
"layout_slot_id": "dining_chair"
|
| 1732 |
+
},
|
| 1733 |
+
{
|
| 1734 |
+
"entity_id": "bath__toilet__01__real_toilet_wallface",
|
| 1735 |
+
"room_id": "bath",
|
| 1736 |
+
"role": "toilet",
|
| 1737 |
+
"layout_slot_id": "toilet"
|
| 1738 |
+
},
|
| 1739 |
+
{
|
| 1740 |
+
"entity_id": "balcony__plant__04__balcony_plant",
|
| 1741 |
+
"room_id": "balcony",
|
| 1742 |
+
"role": "plant",
|
| 1743 |
+
"layout_slot_id": "plant"
|
| 1744 |
+
}
|
| 1745 |
+
],
|
| 1746 |
+
"furniture_count": 12,
|
| 1747 |
+
"plan_library": "ext_libs/x_28571.json",
|
| 1748 |
+
"plan_source": "rplan_production_25.json (October conversion)"
|
| 1749 |
+
}
|
| 1750 |
+
]
|
| 1751 |
+
}
|
docs/reproduction/cases20_floorplans/rebuild_cases20_floorplans.py
ADDED
|
@@ -0,0 +1,418 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Rebuild the 20 floor plans of the RoboHome multi-room benchmark, and the shared per-case inputs, from the Graph2Plan release.
|
| 3 |
+
|
| 4 |
+
The floor plans are derived from RPLAN. RPLAN's terms forbid redistributing the data or anything containing part of it, so the RoboHome
|
| 5 |
+
release ships no room geometry: only the Graph2Plan record names, the conversion methods and parameters (recipes_cases20.json), the
|
| 6 |
+
case texts (cases20_public.json) and the hashes the rebuilt files must reproduce. Download Graph2Plan's Data.zip from the authors yourself
|
| 7 |
+
(https://github.com/HanHan55/Graph2plan, release "data"), then run:
|
| 8 |
+
|
| 9 |
+
python3 rebuild_cases20_floorplans.py --graph2plan Data.zip --robohome-tree <RoboHome code tree> --out rebuilt/ \
|
| 10 |
+
[--legacy-generator <legacy v16.1p scene-generation snapshot>] [--recipes recipes_cases20.json] [--cases cases20_public.json]
|
| 11 |
+
|
| 12 |
+
Outputs:
|
| 13 |
+
rebuilt/ext_libs/x_<record>.json one single-plan library per case: the file RoboHome reads through RHG_RPLAN_SEEDS
|
| 14 |
+
rebuilt/inputs/cases20/<case>/ request.txt, entities.json, rooms.json, floorplan.svg, floorplan.png, case.json (all methods)
|
| 15 |
+
rebuilt/inputs/cases20.json index of the 20 inputs
|
| 16 |
+
rebuilt/verification.json every hash check; the exit status is 1 when a required check fails
|
| 17 |
+
|
| 18 |
+
Three conversion groups (see recipes_cases20.json):
|
| 19 |
+
A 5 plans first converted from the RPLAN images by hand-tuned code: exclusive source boxes, 34 % living/dining split, then the
|
| 20 |
+
published millimetre residuals (bathroom and balcony minimum sizes, dining widths) reproduce the rooms exactly;
|
| 21 |
+
B 14 plans of the October conversion (source boxes, 90 m2 scaling, 34 % living/dining split on the recorded side);
|
| 22 |
+
C 1 plan re-converted by tools/rplan/convert_rplan.py and screened by tools/rplan/screen_library.py of the RoboHome tree.
|
| 23 |
+
Doors, windows and the topology of groups A and B come from the generator's add_plan_topology. The 14 group B plans match the
|
| 24 |
+
distributed hashes exactly only with the October generator snapshot (--legacy-generator); without it the rooms and every other field
|
| 25 |
+
are still checked. RoboHome's own native shell builder recomputes doors and windows from the rooms when a scene is generated, so the
|
| 26 |
+
rooms are what the benchmark depends on.
|
| 27 |
+
|
| 28 |
+
Needs Python 3.10+ with numpy, scipy (scipy.io.loadmat) and shapely; Pillow is optional (floorplan.png).
|
| 29 |
+
"""
|
| 30 |
+
import argparse
|
| 31 |
+
import copy
|
| 32 |
+
import hashlib
|
| 33 |
+
import json
|
| 34 |
+
import os
|
| 35 |
+
import shutil
|
| 36 |
+
import subprocess
|
| 37 |
+
import sys
|
| 38 |
+
import tempfile
|
| 39 |
+
import zipfile
|
| 40 |
+
from pathlib import Path
|
| 41 |
+
|
| 42 |
+
HERE = Path(__file__).resolve().parent
|
| 43 |
+
PROVENANCE_KEYS = ('rplan_source_png', 'rplan_source_file', 'local_fallback_seed_manifest')
|
| 44 |
+
TOPOLOGY_KEYS = ('topology_adjacencies', 'doors', 'windows', 'wall_generation', 'window_rules')
|
| 45 |
+
ROOM_TYPES = {0: ('living', 'living_room'), 1: ('master', 'master_bedroom'), 2: ('kitchen', 'kitchen'), 3: ('bath', 'bathroom'),
|
| 46 |
+
7: ('guest', 'guest_bedroom'), 9: ('balcony', 'balcony')}
|
| 47 |
+
ORDER = ['kitchen', 'dining', 'bath', 'master', 'living', 'guest', 'balcony']
|
| 48 |
+
NEUTRAL_SOURCE_FILE = 'Graph2Plan Data.zip: Network/data.mat'
|
| 49 |
+
SCALE = 40 # px per metre in the input schematics (as in rphome_scripts/inputs/build_inputs.py)
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
# ----------------------------------------------------------------------------------------------------------------------- helpers
|
| 53 |
+
def sha256_bytes(data):
|
| 54 |
+
return hashlib.sha256(data).hexdigest()
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
def sha256_file(path):
|
| 58 |
+
h = hashlib.sha256()
|
| 59 |
+
with open(path, 'rb') as f:
|
| 60 |
+
for block in iter(lambda: f.read(1 << 20), b''):
|
| 61 |
+
h.update(block)
|
| 62 |
+
return h.hexdigest()
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
def canon(obj):
|
| 66 |
+
return json.dumps(obj, sort_keys=True, ensure_ascii=False, separators=(',', ':'))
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
def digest(plan, drop=()):
|
| 70 |
+
return sha256_bytes(canon({k: v for k, v in plan.items() if k not in drop}).encode())
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
def ordered(d, order):
|
| 74 |
+
out = {k: d[k] for k in order if k in d}
|
| 75 |
+
out.update({k: v for k, v in d.items() if k not in out})
|
| 76 |
+
return out
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
# ----------------------------------------------------------------------------------------------------------------------- source data
|
| 80 |
+
def prepare_source(path, recipes, workdir):
|
| 81 |
+
"""Return the path of a verified Network/data.mat, extracted from Data.zip when needed."""
|
| 82 |
+
src = recipes['source']
|
| 83 |
+
path = Path(path)
|
| 84 |
+
if path.suffix.lower() == '.zip':
|
| 85 |
+
got = sha256_file(path)
|
| 86 |
+
if got != src['archive_sha256']:
|
| 87 |
+
sys.exit('%s: sha256 %s, expected %s (Graph2Plan Data.zip)' % (path, got, src['archive_sha256']))
|
| 88 |
+
mat = workdir / 'data.mat'
|
| 89 |
+
with zipfile.ZipFile(path) as z, z.open(src['member']) as f, open(mat, 'wb') as out:
|
| 90 |
+
shutil.copyfileobj(f, out)
|
| 91 |
+
else:
|
| 92 |
+
mat = path
|
| 93 |
+
got = sha256_file(mat)
|
| 94 |
+
if got != src['member_sha256']:
|
| 95 |
+
sys.exit('%s: sha256 %s, expected %s (%s)' % (mat, got, src['member_sha256'], src['member']))
|
| 96 |
+
return mat
|
| 97 |
+
|
| 98 |
+
|
| 99 |
+
def load_boxes(mat, names):
|
| 100 |
+
import numpy as np
|
| 101 |
+
import scipy.io as sio
|
| 102 |
+
data = sio.loadmat(str(mat), squeeze_me=False, struct_as_record=False)['data']
|
| 103 |
+
out = {}
|
| 104 |
+
for i in range(data.shape[0]):
|
| 105 |
+
e = data[i, 0][0, 0]
|
| 106 |
+
name = str(e.name[0])
|
| 107 |
+
if name in names:
|
| 108 |
+
out[name] = dict(rType=[int(x) for x in e.rType.ravel()], gtBox=np.asarray(e.gtBox).astype(int).tolist())
|
| 109 |
+
missing = sorted(set(names) - set(out))
|
| 110 |
+
if missing:
|
| 111 |
+
sys.exit('records not found in data.mat: %s' % missing)
|
| 112 |
+
return out
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
# ----------------------------------------------------------------------------------------------------------------------- conversions
|
| 116 |
+
def split_living(box, side, fraction=.34):
|
| 117 |
+
a, b, c, d = box
|
| 118 |
+
living, dining = [a, b, c, d], [a, b, c, d]
|
| 119 |
+
if side == 'left':
|
| 120 |
+
cut = round(a + (c - a) * fraction, 3); dining[2] = cut; living[0] = cut
|
| 121 |
+
elif side == 'right':
|
| 122 |
+
cut = round(c - (c - a) * fraction, 3); dining[0] = cut; living[2] = cut
|
| 123 |
+
elif side == 'bottom':
|
| 124 |
+
cut = round(b + (d - b) * fraction, 3); dining[3] = cut; living[1] = cut
|
| 125 |
+
else:
|
| 126 |
+
cut = round(d - (d - b) * fraction, 3); dining[1] = cut; living[3] = cut
|
| 127 |
+
return living, dining
|
| 128 |
+
|
| 129 |
+
|
| 130 |
+
def plan_group_b(record, rec, side, source_file):
|
| 131 |
+
"""October conversion: source gtBox rows (y0, x0, y1, x1), uniform scale to 90 m2 (longest side at most 14.8 m), living split."""
|
| 132 |
+
import math
|
| 133 |
+
labels = rec['rType']
|
| 134 |
+
boxes = [[float(b[1]), float(b[0]), float(b[3]), float(b[2])] for b in rec['gtBox'][:len(labels)]]
|
| 135 |
+
area = sum((b[2] - b[0]) * (b[3] - b[1]) for b in boxes)
|
| 136 |
+
x0 = min(b[0] for b in boxes); y0 = min(b[1] for b in boxes)
|
| 137 |
+
extent = max(max(b[2] for b in boxes) - x0, max(b[3] for b in boxes) - y0)
|
| 138 |
+
scale = min(math.sqrt(90.0 / area), 14.8 / extent)
|
| 139 |
+
rooms = [{'room_id': ROOM_TYPES[t][0], 'room_type': ROOM_TYPES[t][1],
|
| 140 |
+
'bounds_m': [round((b[0] - x0) * scale, 3), round((b[1] - y0) * scale, 3), round((b[2] - x0) * scale, 3), round((b[3] - y0) * scale, 3)]}
|
| 141 |
+
for t, b in zip(labels, boxes)]
|
| 142 |
+
living = next(r for r in rooms if r['room_id'] == 'living')
|
| 143 |
+
living['bounds_m'], dining = split_living(living['bounds_m'], side)
|
| 144 |
+
rooms.append({'room_id': 'dining', 'room_type': 'dining_room', 'bounds_m': dining})
|
| 145 |
+
return {'plan_id': 'rplan_graph2plan_%s' % record, 'rplan_source_file': source_file, 'rplan_source_id': record, 'rplan_labels_present': labels,
|
| 146 |
+
'rplan_conversion': {'method': 'source_gtBox_nonoverlap_then_living_dining_split', 'scale_m_per_px': scale, 'target_area_m2_before_clamp': 90,
|
| 147 |
+
'raw_bbox_overlap_score': 0, 'dining_source': 'split_living', 'dining_side': side, 'dining_fraction': .34},
|
| 148 |
+
'rooms': sorted(rooms, key=lambda r: ORDER.index(r['room_id'])),
|
| 149 |
+
'open_room_type_pairs': [['kitchen', 'dining_room'], ['dining_room', 'living_room']], 'wall_thickness_m': .2, 'wall_height_m': 3.0}
|
| 150 |
+
|
| 151 |
+
|
| 152 |
+
def plan_group_a(entry, rec, provenance_fields):
|
| 153 |
+
"""Original plans: exclusive source boxes at the house corner, recorded scale, 34 % living split, then the millimetre residuals."""
|
| 154 |
+
conv = dict(entry['rplan_conversion'])
|
| 155 |
+
scale = conv['scale_m_per_px']
|
| 156 |
+
labels = rec['rType']
|
| 157 |
+
px = {label: [b[1], b[0], b[3] + 1, b[2] + 1] for label, b in zip(labels, rec['gtBox'][:len(labels)])}
|
| 158 |
+
ox = min(v[0] for v in px.values()); oy = min(v[1] for v in px.values())
|
| 159 |
+
metres = {label: [round((v[0] - ox) * scale, 3), round((v[1] - oy) * scale, 3), round((v[2] - ox) * scale, 3), round((v[3] - oy) * scale, 3)]
|
| 160 |
+
for label, v in px.items()}
|
| 161 |
+
living, dining = split_living(metres[0], entry['dining_side'])
|
| 162 |
+
rooms = []
|
| 163 |
+
for room in entry['rooms_recipe']:
|
| 164 |
+
base = dining if room['room_id'] == 'dining' else living if room['room_id'] == 'living' else metres[room['source_label']]
|
| 165 |
+
rooms.append({'room_id': room['room_id'], 'room_type': room['room_type'],
|
| 166 |
+
'bounds_m': [round(b + r / 1000.0, 3) for b, r in zip(base, room['residual_mm'])]})
|
| 167 |
+
conv['outline_px'] = [ox, oy, max(v[2] for v in px.values()), max(v[3] for v in px.values())]
|
| 168 |
+
plan = dict(entry['plan_fields'])
|
| 169 |
+
plan.update(rplan_conversion=ordered(conv, entry['rplan_conversion_key_order']), rplan_labels_present=sorted(labels), rooms=rooms)
|
| 170 |
+
neutral = {'rplan_source_png': 'RPLAN image %s.png (not distributed)' % entry['record'],
|
| 171 |
+
'rplan_source_file': 'RoboHome internal record (not distributed)',
|
| 172 |
+
'local_fallback_seed_manifest': 'RoboHome internal record (not distributed)'}
|
| 173 |
+
plan.update({k: provenance_fields.get(k, neutral[k]) for k in PROVENANCE_KEYS if k in entry['plan_key_order']})
|
| 174 |
+
return plan
|
| 175 |
+
|
| 176 |
+
|
| 177 |
+
# ----------------------------------------------------------------------------------------------------------------------- workers
|
| 178 |
+
# The generator modules of the legacy snapshot and of the RoboHome tree share module names, so each runs in its own process.
|
| 179 |
+
def worker_main(mode, args_path):
|
| 180 |
+
job = json.loads(Path(args_path).read_text())
|
| 181 |
+
tmp = Path(job['tmp'])
|
| 182 |
+
os.environ.update(XDG_CACHE_HOME=str(tmp), RHG_RUNTIME_ROOT=str(tmp / 'runtime'), RHG_ASTRA_CACHE_DIR=str(tmp / 'astra'), TMPDIR=str(tmp),
|
| 183 |
+
RHG_OUT_ROOT=str(tmp), RHG_CANDIDATE_CACHE_DIR=str(tmp), RHG_WALL_HEIGHT_M='3.0', RHG_DOOR_WIDTH_M='1.0',
|
| 184 |
+
RHG_DOOR_HEIGHT_M='2.4', RHG_TEST_SCENE_COUNT='1')
|
| 185 |
+
tempfile.tempdir = str(tmp)
|
| 186 |
+
tree = Path(job['tree'])
|
| 187 |
+
if mode == 'topology':
|
| 188 |
+
helpers = Path(job['generator'])
|
| 189 |
+
os.environ['RHG_BASE_SCRIPT'] = str(helpers / 'base/rhg_fullhome_test_generate_v2.py')
|
| 190 |
+
sys.path[:0] = [str(helpers), str(tree / 'engine/supervisor_site')]
|
| 191 |
+
if job['generator_is_tree']:
|
| 192 |
+
sys.path[:0] = [str(tree), str(tree / 'engine/source')]
|
| 193 |
+
import importlib
|
| 194 |
+
g = importlib.import_module('rhg_task_contract_generate_v16_1p_procedural_pure')
|
| 195 |
+
result = {key: g.add_plan_topology(copy.deepcopy(plan)) for key, plan in job['plans'].items()}
|
| 196 |
+
elif mode == 'convert':
|
| 197 |
+
sys.path[:0] = [str(tree / 'tools/rplan'), str(tree / 'engine/supervisor_site')]
|
| 198 |
+
import convert_rplan
|
| 199 |
+
import screen_library
|
| 200 |
+
wanted = {c['record']: c for c in job['conversions']}
|
| 201 |
+
records = {r['name']: r for r in convert_rplan.load_records(job['mat']) if r['name'] in wanted}
|
| 202 |
+
screen_library.init_worker(str(tree))
|
| 203 |
+
result = {}
|
| 204 |
+
for record, c in wanted.items():
|
| 205 |
+
plan, reason = convert_rplan.convert(records[record], **c['options'])
|
| 206 |
+
if plan is None:
|
| 207 |
+
result[record] = {'error': 'convert: %s' % reason}
|
| 208 |
+
continue
|
| 209 |
+
_, screened, why = screen_library.screen_one((plan, c['screening_options']))
|
| 210 |
+
result[record] = screened if screened else {'error': 'screen: %s' % why}
|
| 211 |
+
else:
|
| 212 |
+
raise SystemExit('unknown worker mode %s' % mode)
|
| 213 |
+
Path(job['out']).write_text(json.dumps(result, ensure_ascii=False))
|
| 214 |
+
|
| 215 |
+
|
| 216 |
+
def run_worker(mode, job, tmp):
|
| 217 |
+
job = dict(job, tmp=str(tmp), out=str(tmp / ('%s.out.json' % mode)))
|
| 218 |
+
args_path = tmp / ('%s.job.json' % mode)
|
| 219 |
+
args_path.write_text(json.dumps(job, ensure_ascii=False))
|
| 220 |
+
env = dict(os.environ, PYTHONDONTWRITEBYTECODE='1')
|
| 221 |
+
subprocess.run([sys.executable, str(Path(__file__).resolve()), '--_worker', mode, str(args_path)], check=True, env=env, cwd=str(tmp))
|
| 222 |
+
return json.loads(Path(job['out']).read_text())
|
| 223 |
+
|
| 224 |
+
|
| 225 |
+
# ----------------------------------------------------------------------------------------------------------------------- inputs
|
| 226 |
+
def floorplan_svg(rooms):
|
| 227 |
+
x1 = max(r['bounds_m'][2] for r in rooms)
|
| 228 |
+
y1 = max(r['bounds_m'][3] for r in rooms)
|
| 229 |
+
pad = 20
|
| 230 |
+
w, h = int(x1 * SCALE) + 2 * pad, int(y1 * SCALE) + 2 * pad + 30
|
| 231 |
+
parts = [f'<svg xmlns="http://www.w3.org/2000/svg" width="{w}" height="{h}" viewBox="0 0 {w} {h}">',
|
| 232 |
+
'<rect width="100%" height="100%" fill="white"/>']
|
| 233 |
+
for r in rooms:
|
| 234 |
+
a, b, c, d = r['bounds_m']
|
| 235 |
+
px, py = pad + a * SCALE, pad + (y1 - d) * SCALE
|
| 236 |
+
pw, ph = (c - a) * SCALE, (d - b) * SCALE
|
| 237 |
+
parts.append(f'<rect x="{px:.1f}" y="{py:.1f}" width="{pw:.1f}" height="{ph:.1f}" fill="#f4f4f4" stroke="black" stroke-width="2"/>')
|
| 238 |
+
label = r['room_type'].replace('_', ' ')
|
| 239 |
+
area = (c - a) * (d - b)
|
| 240 |
+
parts.append(f'<text x="{px + pw / 2:.1f}" y="{py + ph / 2:.1f}" font-family="sans-serif" font-size="12" text-anchor="middle">{label}</text>')
|
| 241 |
+
parts.append(f'<text x="{px + pw / 2:.1f}" y="{py + ph / 2 + 15:.1f}" font-family="sans-serif" font-size="10" text-anchor="middle">{area:.1f} m2</text>')
|
| 242 |
+
yb = h - 18
|
| 243 |
+
parts.append(f'<line x1="{pad}" y1="{yb}" x2="{pad + 2 * SCALE}" y2="{yb}" stroke="black" stroke-width="3"/>')
|
| 244 |
+
parts.append(f'<text x="{pad + 2 * SCALE + 6}" y="{yb + 4}" font-family="sans-serif" font-size="11">2 m</text>')
|
| 245 |
+
parts.append('</svg>')
|
| 246 |
+
return '\n'.join(parts) + '\n'
|
| 247 |
+
|
| 248 |
+
|
| 249 |
+
def floorplan_png(rooms, path):
|
| 250 |
+
try:
|
| 251 |
+
from PIL import Image, ImageDraw
|
| 252 |
+
except ImportError:
|
| 253 |
+
return False
|
| 254 |
+
x1 = max(r['bounds_m'][2] for r in rooms)
|
| 255 |
+
y1 = max(r['bounds_m'][3] for r in rooms)
|
| 256 |
+
pad = 20
|
| 257 |
+
img = Image.new('RGB', (int(x1 * SCALE) + 2 * pad, int(y1 * SCALE) + 2 * pad + 30), 'white')
|
| 258 |
+
draw = ImageDraw.Draw(img)
|
| 259 |
+
for r in rooms:
|
| 260 |
+
a, b, c, d = r['bounds_m']
|
| 261 |
+
box = [pad + a * SCALE, pad + (y1 - d) * SCALE, pad + c * SCALE, pad + (y1 - b) * SCALE]
|
| 262 |
+
draw.rectangle(box, fill=(244, 244, 244), outline='black', width=2)
|
| 263 |
+
cx, cy = (box[0] + box[2]) / 2, (box[1] + box[3]) / 2
|
| 264 |
+
draw.text((cx, cy), r['room_type'].replace('_', ' '), fill='black', anchor='mm')
|
| 265 |
+
yb = img.height - 18
|
| 266 |
+
draw.line([pad, yb, pad + 2 * SCALE, yb], fill='black', width=3)
|
| 267 |
+
draw.text((pad + 2 * SCALE + 6, yb), '2 m', fill='black', anchor='lm')
|
| 268 |
+
img.save(path)
|
| 269 |
+
return True
|
| 270 |
+
|
| 271 |
+
|
| 272 |
+
def write_inputs(cases_doc, rooms_by_case, out, plan_library_of):
|
| 273 |
+
root = out / 'inputs'
|
| 274 |
+
base = root / 'cases20'
|
| 275 |
+
base.mkdir(parents=True, exist_ok=True)
|
| 276 |
+
manifest = cases_doc['source_manifest']
|
| 277 |
+
index = []
|
| 278 |
+
for case in cases_doc['cases']:
|
| 279 |
+
cid, k = case['id'], case['k']
|
| 280 |
+
rooms = rooms_by_case[cid]
|
| 281 |
+
d = base / cid
|
| 282 |
+
d.mkdir(exist_ok=True)
|
| 283 |
+
library = plan_library_of(case)
|
| 284 |
+
record = dict(case=cid, k=k, prompt=case['prompt'], prompt_sha256=case['prompt_sha256'], floor_plan_id=case['floor_plan_id'],
|
| 285 |
+
rplan_index=case['rplan_index'], target_floor_area_m2=case['target_floor_area_m2'], rooms=rooms,
|
| 286 |
+
entities=case['entities'], furniture_count=case['furniture_count'], plan_library=library, plan_source=case['plan_source'],
|
| 287 |
+
october_seed=case['seed'], source='%s (sha256 %s)' % (manifest['name'], manifest['sha256'][:12]))
|
| 288 |
+
(d / 'request.txt').write_text(case['prompt'] + '\n', encoding='utf-8')
|
| 289 |
+
(d / 'entities.json').write_text(json.dumps(case['entities'], indent=1, ensure_ascii=False) + '\n', encoding='utf-8')
|
| 290 |
+
(d / 'rooms.json').write_text(json.dumps(dict(target_floor_area_m2=case['target_floor_area_m2'], floor_plan_id=case['floor_plan_id'],
|
| 291 |
+
rooms=rooms), indent=1, ensure_ascii=False) + '\n', encoding='utf-8')
|
| 292 |
+
(d / 'floorplan.svg').write_text(floorplan_svg(rooms), encoding='utf-8')
|
| 293 |
+
png = floorplan_png(rooms, d / 'floorplan.png')
|
| 294 |
+
(d / 'case.json').write_text(json.dumps(record, indent=1, ensure_ascii=False) + '\n', encoding='utf-8')
|
| 295 |
+
index.append(dict(case=cid, k=k, dir='inputs/cases20/%s' % cid, floor_plan_id=case['floor_plan_id'], plan_library=library,
|
| 296 |
+
prompt_sha256=case['prompt_sha256'], rooms=len(rooms), entities=len(case['entities']), floorplan_png=png))
|
| 297 |
+
(root / 'cases20.json').write_text(json.dumps(dict(schema='rphome.inputs.v1', n=len(index), cases_sha256=manifest['sha256'], cases=index),
|
| 298 |
+
indent=1, ensure_ascii=False) + '\n', encoding='utf-8')
|
| 299 |
+
return root
|
| 300 |
+
|
| 301 |
+
|
| 302 |
+
# ----------------------------------------------------------------------------------------------------------------------- main
|
| 303 |
+
def main(argv=None):
|
| 304 |
+
argv = sys.argv[1:] if argv is None else argv
|
| 305 |
+
if argv[:1] == ['--_worker']:
|
| 306 |
+
return worker_main(argv[1], argv[2])
|
| 307 |
+
ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
|
| 308 |
+
ap.add_argument('--graph2plan', required=True, help="Graph2Plan's Data.zip, or the Network/data.mat extracted from it")
|
| 309 |
+
ap.add_argument('--robohome-tree', required=True, type=Path, help='RoboHome code tree (tools/rplan and the scene-generation engine)')
|
| 310 |
+
ap.add_argument('--legacy-generator', type=Path,
|
| 311 |
+
help='October 2026 snapshot of the v16.1p scene-generation helpers: reproduces the doors and windows of the group B libraries exactly')
|
| 312 |
+
ap.add_argument('--out', required=True, type=Path)
|
| 313 |
+
ap.add_argument('--recipes', type=Path, default=HERE / 'recipes_cases20.json')
|
| 314 |
+
ap.add_argument('--cases', type=Path, default=HERE / 'cases20_public.json')
|
| 315 |
+
ap.add_argument('--provenance', type=Path, help=argparse.SUPPRESS) # RoboHome-internal: restores original path strings for byte-exact checks
|
| 316 |
+
args = ap.parse_args(argv)
|
| 317 |
+
args.out, args.robohome_tree = args.out.resolve(), args.robohome_tree.resolve()
|
| 318 |
+
if args.legacy_generator:
|
| 319 |
+
args.legacy_generator = args.legacy_generator.resolve()
|
| 320 |
+
args.graph2plan = str(Path(args.graph2plan).resolve())
|
| 321 |
+
|
| 322 |
+
recipes = json.loads(args.recipes.read_text())
|
| 323 |
+
cases_doc = json.loads(args.cases.read_text())
|
| 324 |
+
internal = json.loads(args.provenance.read_text()) if args.provenance else None
|
| 325 |
+
out = args.out
|
| 326 |
+
(out / 'ext_libs').mkdir(parents=True, exist_ok=True)
|
| 327 |
+
tmp = Path(tempfile.mkdtemp(prefix='rebuild_cases20_', dir=str(out)))
|
| 328 |
+
checks = []
|
| 329 |
+
|
| 330 |
+
def check(name, got, expected, required=True):
|
| 331 |
+
ok = got == expected
|
| 332 |
+
checks.append(dict(check=name, ok=ok, required=required, got=got, expected=expected))
|
| 333 |
+
return ok
|
| 334 |
+
|
| 335 |
+
try:
|
| 336 |
+
mat = prepare_source(args.graph2plan, recipes, tmp)
|
| 337 |
+
libraries = recipes['libraries']
|
| 338 |
+
shared = recipes['shared_input_overrides']
|
| 339 |
+
boxes = load_boxes(mat, {e['record'] for e in libraries if e['group'] in 'AB'} | {s['record'] for s in shared})
|
| 340 |
+
prov = {p['case']: p for p in internal['libraries']} if internal else {}
|
| 341 |
+
wrappers = internal['wrappers'] if internal else recipes['wrappers']
|
| 342 |
+
|
| 343 |
+
plans, pending = {}, {}
|
| 344 |
+
for e in libraries:
|
| 345 |
+
fields = prov.get(e['case'], {}).get('fields', {})
|
| 346 |
+
if e['group'] == 'B':
|
| 347 |
+
plans[e['case']] = plan_group_b(e['record'], boxes[e['record']], e['dining_side'], fields.get('rplan_source_file', NEUTRAL_SOURCE_FILE))
|
| 348 |
+
pending[e['case']] = plans[e['case']]
|
| 349 |
+
elif e['group'] == 'A':
|
| 350 |
+
plans[e['case']] = plan_group_a(e, boxes[e['record']], fields)
|
| 351 |
+
pending[e['case']] = plans[e['case']]
|
| 352 |
+
generator = args.legacy_generator or (args.robohome_tree / 'engine/source/scripts/internal/scene_generation')
|
| 353 |
+
topo = run_worker('topology', dict(tree=str(args.robohome_tree), generator=str(generator), generator_is_tree=args.legacy_generator is None,
|
| 354 |
+
plans=pending), tmp)
|
| 355 |
+
for case, plan in topo.items():
|
| 356 |
+
plans[case] = plan
|
| 357 |
+
conversions = [dict(record=e['record'], options=wrappers[e['wrapper']]['options'], screening_options=wrappers[e['wrapper']]['screening_options'])
|
| 358 |
+
for e in libraries if e['group'] == 'C']
|
| 359 |
+
converted = run_worker('convert', dict(tree=str(args.robohome_tree), mat=str(mat), conversions=conversions), tmp) if conversions else {}
|
| 360 |
+
for e in libraries:
|
| 361 |
+
if e['group'] == 'C':
|
| 362 |
+
plan = converted[e['record']]
|
| 363 |
+
if 'error' in plan:
|
| 364 |
+
sys.exit('%s: %s' % (e['case'], plan['error']))
|
| 365 |
+
plans[e['case']] = plan
|
| 366 |
+
|
| 367 |
+
rooms_by_case = {}
|
| 368 |
+
for e in libraries:
|
| 369 |
+
plan = ordered(plans[e['case']], e['plan_key_order'])
|
| 370 |
+
name = e['case'] + ' ' + e['plan_id']
|
| 371 |
+
check(name + ' rooms', sha256_bytes(canon(plan['rooms']).encode()), e['expected']['rooms_sha256'])
|
| 372 |
+
check(name + ' plan core', digest(plan, PROVENANCE_KEYS + TOPOLOGY_KEYS), e['expected']['plan_core_sha256'])
|
| 373 |
+
if e['group'] == 'B' and not args.legacy_generator:
|
| 374 |
+
checks.append(dict(check=name + ' plan with doors/windows', ok=None, required=False,
|
| 375 |
+
note='skipped: needs --legacy-generator (RoboHome recomputes doors and windows at generation time)'))
|
| 376 |
+
else:
|
| 377 |
+
drop = PROVENANCE_KEYS + (TOPOLOGY_KEYS if e['group'] == 'A' else ())
|
| 378 |
+
check(name + ' plan', digest(plan, drop), e['expected']['plan_sha256'])
|
| 379 |
+
library = ordered(dict(wrappers[e['wrapper']], plans=[plan]), e['library_key_order'])
|
| 380 |
+
ensure_ascii = prov.get(e['case'], {}).get('ensure_ascii', True)
|
| 381 |
+
data = json.dumps(library, ensure_ascii=ensure_ascii).encode()
|
| 382 |
+
(out / 'ext_libs' / e['library_file']).write_bytes(data)
|
| 383 |
+
if internal:
|
| 384 |
+
check(name + ' file bytes (internal)', sha256_bytes(data), prov[e['case']]['file_sha256'], required=e['group'] != 'A')
|
| 385 |
+
rooms_by_case[e['case']] = plan['rooms']
|
| 386 |
+
for s in shared:
|
| 387 |
+
plan = plan_group_b(s['record'], boxes[s['record']], s['dining_side'], NEUTRAL_SOURCE_FILE)
|
| 388 |
+
check(s['case'] + ' shared-input rooms (October %s)' % s['plan_id'], sha256_bytes(canon(plan['rooms']).encode()), s['expected']['rooms_sha256'])
|
| 389 |
+
rooms_by_case[s['case']] = plan['rooms']
|
| 390 |
+
|
| 391 |
+
internal_paths = {p['case']: p['library_path'] for p in internal['libraries']} if internal else {}
|
| 392 |
+
root = write_inputs(cases_doc, rooms_by_case, out,
|
| 393 |
+
lambda case: internal_paths.get(case['id'], case['plan_library']))
|
| 394 |
+
expected_inputs = dict(recipes['expected_inputs_sha256'], **(internal['expected_inputs_sha256'] if internal else {}))
|
| 395 |
+
for rel, expected in sorted(expected_inputs.items()):
|
| 396 |
+
path = root / rel
|
| 397 |
+
if not path.exists():
|
| 398 |
+
checks.append(dict(check='input ' + rel, ok=False, required=not rel.endswith('.png'), note='not written'))
|
| 399 |
+
continue
|
| 400 |
+
# The original cases20.json index records floorplan_png=false (written where Pillow was missing) although the PNG files exist.
|
| 401 |
+
check('input ' + rel, sha256_file(path), expected, required=not rel.endswith('.png') and rel != 'cases20.json')
|
| 402 |
+
finally:
|
| 403 |
+
shutil.rmtree(tmp, ignore_errors=True)
|
| 404 |
+
|
| 405 |
+
failed = [c for c in checks if c['ok'] is False and c['required']]
|
| 406 |
+
soft = [c for c in checks if c['ok'] is False and not c['required']]
|
| 407 |
+
report = dict(passed=sum(1 for c in checks if c['ok']), failed_required=len(failed), failed_optional=len(soft),
|
| 408 |
+
skipped=sum(1 for c in checks if c['ok'] is None), checks=checks)
|
| 409 |
+
(out / 'verification.json').write_text(json.dumps(report, ensure_ascii=False, indent=1) + '\n')
|
| 410 |
+
print('%d checks passed, %d required failed, %d optional failed, %d skipped -> %s'
|
| 411 |
+
% (report['passed'], report['failed_required'], report['failed_optional'], report['skipped'], out / 'verification.json'))
|
| 412 |
+
for c in failed + soft:
|
| 413 |
+
print(' %s %s' % ('FAIL' if c['required'] else 'warn', c['check']))
|
| 414 |
+
return 1 if failed else 0
|
| 415 |
+
|
| 416 |
+
|
| 417 |
+
if __name__ == '__main__':
|
| 418 |
+
sys.exit(main())
|
docs/reproduction/cases20_floorplans/recipes_cases20.json
ADDED
|
@@ -0,0 +1,1528 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema": "robohome.cases20_floorplan_recipes.v1",
|
| 3 |
+
"source": {
|
| 4 |
+
"name": "Graph2Plan author release (RPLAN-derived data, obtain it yourself)",
|
| 5 |
+
"url": "https://github.com/HanHan55/Graph2plan/releases/download/data/Data.zip",
|
| 6 |
+
"archive_sha256": "e88f1c52eb065a4441f9675f6f5401e3e46add4b3ae6ad96f63fb527b6958cd3",
|
| 7 |
+
"member": "Network/data.mat",
|
| 8 |
+
"member_sha256": "ce1e9c7fc2846c2d5a36485c8fa4d16df9b7de0ccda31581fe76fc2fa6f28adc"
|
| 9 |
+
},
|
| 10 |
+
"hash_definitions": {
|
| 11 |
+
"canonical": "json.dumps(obj, sort_keys=True, ensure_ascii=False, separators=(\",\", \":\")) encoded as UTF-8",
|
| 12 |
+
"provenance_keys": [
|
| 13 |
+
"rplan_source_png",
|
| 14 |
+
"rplan_source_file",
|
| 15 |
+
"local_fallback_seed_manifest"
|
| 16 |
+
],
|
| 17 |
+
"topology_keys": [
|
| 18 |
+
"topology_adjacencies",
|
| 19 |
+
"doors",
|
| 20 |
+
"windows",
|
| 21 |
+
"wall_generation",
|
| 22 |
+
"window_rules"
|
| 23 |
+
],
|
| 24 |
+
"rooms_sha256": "sha256 of canonical plan[\"rooms\"]",
|
| 25 |
+
"plan_core_sha256": "sha256 of canonical plan without provenance and topology keys",
|
| 26 |
+
"plan_sha256": "sha256 of canonical plan without provenance keys (group A also without topology keys)"
|
| 27 |
+
},
|
| 28 |
+
"wrappers": {
|
| 29 |
+
"w_1e0513e7d441": {
|
| 30 |
+
"schema": "robohousegen.rplan_seed_file.expanded25.qualified_v1",
|
| 31 |
+
"source": "original five unchanged plus twenty independently generated and verified Graph2Plan/RPLAN source layouts",
|
| 32 |
+
"provenance": {
|
| 33 |
+
"source_receipt": "internal RoboHome record, not distributed",
|
| 34 |
+
"selection_report": "internal RoboHome record, not distributed",
|
| 35 |
+
"candidate_ledger": "internal RoboHome record, not distributed",
|
| 36 |
+
"geometry_verification": "internal RoboHome record, not distributed",
|
| 37 |
+
"source_url": "https://github.com/HanHan55/Graph2plan/releases/download/data/Data.zip"
|
| 38 |
+
},
|
| 39 |
+
"plan_count": 1
|
| 40 |
+
},
|
| 41 |
+
"w_3b47d637bcdc": {
|
| 42 |
+
"schema": "robohousegen.rplan_seed_file.screened_v1",
|
| 43 |
+
"source": "Graph2Plan RPLAN release, room polygons reduced to rectangles",
|
| 44 |
+
"source_record_count": 80788,
|
| 45 |
+
"options": {
|
| 46 |
+
"scale_target": 100.0,
|
| 47 |
+
"min_retained": 0.0,
|
| 48 |
+
"extra_bedroom_area": 10.0,
|
| 49 |
+
"min_side": {
|
| 50 |
+
"living": 2.8,
|
| 51 |
+
"bedroom": 2.5,
|
| 52 |
+
"dining": 2.0,
|
| 53 |
+
"kitchen": 1.8,
|
| 54 |
+
"bath": 1.5,
|
| 55 |
+
"balcony": 1.0,
|
| 56 |
+
"default": 1.8
|
| 57 |
+
},
|
| 58 |
+
"repair": true,
|
| 59 |
+
"max_aspect": 5.0,
|
| 60 |
+
"max_growth": 2.5,
|
| 61 |
+
"require_guest": true,
|
| 62 |
+
"strict_access": false,
|
| 63 |
+
"drop_balcony": true,
|
| 64 |
+
"candidates_per_room": 8,
|
| 65 |
+
"hallways": true
|
| 66 |
+
},
|
| 67 |
+
"screened_count": 46353,
|
| 68 |
+
"screening_options": {
|
| 69 |
+
"min_score": null,
|
| 70 |
+
"allow_missing_windows": false,
|
| 71 |
+
"topology_gate": false,
|
| 72 |
+
"fix": true,
|
| 73 |
+
"limits": {
|
| 74 |
+
"kitchen": 1.8,
|
| 75 |
+
"bath": 1.5,
|
| 76 |
+
"balcony": 1.0,
|
| 77 |
+
"hallway": 1.0,
|
| 78 |
+
"default": 1.8,
|
| 79 |
+
"living": 2.8,
|
| 80 |
+
"bedroom": 2.5,
|
| 81 |
+
"dining": 2.0
|
| 82 |
+
}
|
| 83 |
+
},
|
| 84 |
+
"plan_count": 1
|
| 85 |
+
}
|
| 86 |
+
},
|
| 87 |
+
"libraries": [
|
| 88 |
+
{
|
| 89 |
+
"case": "scene_000",
|
| 90 |
+
"plan_id": "rplan_constrained_45966_scene_010_v16_task_contract",
|
| 91 |
+
"group": "A",
|
| 92 |
+
"library_file": "x_45966.json",
|
| 93 |
+
"wrapper": "w_1e0513e7d441",
|
| 94 |
+
"library_key_order": [
|
| 95 |
+
"schema",
|
| 96 |
+
"source",
|
| 97 |
+
"provenance",
|
| 98 |
+
"plan_count",
|
| 99 |
+
"plans"
|
| 100 |
+
],
|
| 101 |
+
"plan_key_order": [
|
| 102 |
+
"plan_id",
|
| 103 |
+
"rplan_source_png",
|
| 104 |
+
"rplan_source_file",
|
| 105 |
+
"rplan_labels_present",
|
| 106 |
+
"rplan_conversion",
|
| 107 |
+
"rooms",
|
| 108 |
+
"open_room_type_pairs",
|
| 109 |
+
"wall_thickness_m",
|
| 110 |
+
"wall_height_m",
|
| 111 |
+
"topology_adjacencies",
|
| 112 |
+
"doors",
|
| 113 |
+
"wall_generation",
|
| 114 |
+
"windows",
|
| 115 |
+
"local_fallback_seed_manifest"
|
| 116 |
+
],
|
| 117 |
+
"expected": {
|
| 118 |
+
"rooms_sha256": "423e28d6baff9fcc3828b78fbdeaabf07b5a9e471ef0ac7a327f9423be788f3f",
|
| 119 |
+
"plan_core_sha256": "b7383685ce7200a81ffaed3516352d57e7f50497760315bdf03e9d0d01bd2d52",
|
| 120 |
+
"plan_sha256": "b7383685ce7200a81ffaed3516352d57e7f50497760315bdf03e9d0d01bd2d52"
|
| 121 |
+
},
|
| 122 |
+
"record": "45966",
|
| 123 |
+
"dining_side": "left",
|
| 124 |
+
"rplan_conversion": {
|
| 125 |
+
"method": "semantic_room_bbox_low_overlap_then_living_dining_split",
|
| 126 |
+
"rank": 0,
|
| 127 |
+
"scale_m_per_px": 0.07437,
|
| 128 |
+
"target_area_m2_before_clamp": 90.07,
|
| 129 |
+
"room_pixel_area": 14345,
|
| 130 |
+
"outline_m": [
|
| 131 |
+
0.0,
|
| 132 |
+
0.0,
|
| 133 |
+
7.065,
|
| 134 |
+
14.8
|
| 135 |
+
],
|
| 136 |
+
"raw_bbox_overlap_score": 0.0,
|
| 137 |
+
"final_bbox_overlap_score": 0.0,
|
| 138 |
+
"dining_source": "split_living",
|
| 139 |
+
"aspect_bin": "tall"
|
| 140 |
+
},
|
| 141 |
+
"rplan_conversion_key_order": [
|
| 142 |
+
"method",
|
| 143 |
+
"rank",
|
| 144 |
+
"scale_m_per_px",
|
| 145 |
+
"target_area_m2_before_clamp",
|
| 146 |
+
"room_pixel_area",
|
| 147 |
+
"outline_px",
|
| 148 |
+
"outline_m",
|
| 149 |
+
"raw_bbox_overlap_score",
|
| 150 |
+
"final_bbox_overlap_score",
|
| 151 |
+
"dining_source",
|
| 152 |
+
"aspect_bin"
|
| 153 |
+
],
|
| 154 |
+
"rooms_recipe": [
|
| 155 |
+
{
|
| 156 |
+
"room_id": "kitchen",
|
| 157 |
+
"room_type": "kitchen",
|
| 158 |
+
"source_label": 2,
|
| 159 |
+
"residual_mm": [
|
| 160 |
+
0,
|
| 161 |
+
0,
|
| 162 |
+
0,
|
| 163 |
+
0
|
| 164 |
+
]
|
| 165 |
+
},
|
| 166 |
+
{
|
| 167 |
+
"room_id": "dining",
|
| 168 |
+
"room_type": "dining_room",
|
| 169 |
+
"source_label": 0,
|
| 170 |
+
"residual_mm": [
|
| 171 |
+
0,
|
| 172 |
+
0,
|
| 173 |
+
0,
|
| 174 |
+
0
|
| 175 |
+
]
|
| 176 |
+
},
|
| 177 |
+
{
|
| 178 |
+
"room_id": "bath",
|
| 179 |
+
"room_type": "bathroom",
|
| 180 |
+
"source_label": 3,
|
| 181 |
+
"residual_mm": [
|
| 182 |
+
-6,
|
| 183 |
+
0,
|
| 184 |
+
7,
|
| 185 |
+
0
|
| 186 |
+
]
|
| 187 |
+
},
|
| 188 |
+
{
|
| 189 |
+
"room_id": "master",
|
| 190 |
+
"room_type": "master_bedroom",
|
| 191 |
+
"source_label": 1,
|
| 192 |
+
"residual_mm": [
|
| 193 |
+
0,
|
| 194 |
+
1,
|
| 195 |
+
0,
|
| 196 |
+
1
|
| 197 |
+
]
|
| 198 |
+
},
|
| 199 |
+
{
|
| 200 |
+
"room_id": "living",
|
| 201 |
+
"room_type": "living_room",
|
| 202 |
+
"source_label": 0,
|
| 203 |
+
"residual_mm": [
|
| 204 |
+
0,
|
| 205 |
+
0,
|
| 206 |
+
0,
|
| 207 |
+
0
|
| 208 |
+
]
|
| 209 |
+
},
|
| 210 |
+
{
|
| 211 |
+
"room_id": "guest",
|
| 212 |
+
"room_type": "guest_bedroom",
|
| 213 |
+
"source_label": 7,
|
| 214 |
+
"residual_mm": [
|
| 215 |
+
0,
|
| 216 |
+
1,
|
| 217 |
+
0,
|
| 218 |
+
1
|
| 219 |
+
]
|
| 220 |
+
},
|
| 221 |
+
{
|
| 222 |
+
"room_id": "balcony",
|
| 223 |
+
"room_type": "balcony",
|
| 224 |
+
"source_label": 9,
|
| 225 |
+
"residual_mm": [
|
| 226 |
+
0,
|
| 227 |
+
1,
|
| 228 |
+
0,
|
| 229 |
+
0
|
| 230 |
+
]
|
| 231 |
+
}
|
| 232 |
+
],
|
| 233 |
+
"plan_fields": {
|
| 234 |
+
"plan_id": "rplan_constrained_45966_scene_010_v16_task_contract",
|
| 235 |
+
"open_room_type_pairs": [
|
| 236 |
+
[
|
| 237 |
+
"kitchen",
|
| 238 |
+
"dining_room"
|
| 239 |
+
],
|
| 240 |
+
[
|
| 241 |
+
"dining_room",
|
| 242 |
+
"living_room"
|
| 243 |
+
]
|
| 244 |
+
],
|
| 245 |
+
"wall_thickness_m": 0.2,
|
| 246 |
+
"wall_height_m": 1.35
|
| 247 |
+
}
|
| 248 |
+
},
|
| 249 |
+
{
|
| 250 |
+
"case": "scene_001",
|
| 251 |
+
"plan_id": "rplan_constrained_78215_scene_011_v16_task_contract",
|
| 252 |
+
"group": "A",
|
| 253 |
+
"library_file": "x_78215.json",
|
| 254 |
+
"wrapper": "w_1e0513e7d441",
|
| 255 |
+
"library_key_order": [
|
| 256 |
+
"schema",
|
| 257 |
+
"source",
|
| 258 |
+
"provenance",
|
| 259 |
+
"plan_count",
|
| 260 |
+
"plans"
|
| 261 |
+
],
|
| 262 |
+
"plan_key_order": [
|
| 263 |
+
"plan_id",
|
| 264 |
+
"rplan_source_png",
|
| 265 |
+
"rplan_source_file",
|
| 266 |
+
"rplan_labels_present",
|
| 267 |
+
"rplan_conversion",
|
| 268 |
+
"rooms",
|
| 269 |
+
"open_room_type_pairs",
|
| 270 |
+
"wall_thickness_m",
|
| 271 |
+
"wall_height_m",
|
| 272 |
+
"topology_adjacencies",
|
| 273 |
+
"doors",
|
| 274 |
+
"wall_generation",
|
| 275 |
+
"windows",
|
| 276 |
+
"local_fallback_seed_manifest"
|
| 277 |
+
],
|
| 278 |
+
"expected": {
|
| 279 |
+
"rooms_sha256": "32ba4c45ad03d048e85e88475dbf25e926a24f8b1b0c516faef5a581ed4ec2a0",
|
| 280 |
+
"plan_core_sha256": "7bb8ad5f630360bff7e70d0824cf148fbb6fcb205f7bbd0ca21ab8f92d283d46",
|
| 281 |
+
"plan_sha256": "7bb8ad5f630360bff7e70d0824cf148fbb6fcb205f7bbd0ca21ab8f92d283d46"
|
| 282 |
+
},
|
| 283 |
+
"record": "78215",
|
| 284 |
+
"dining_side": "top",
|
| 285 |
+
"rplan_conversion": {
|
| 286 |
+
"method": "semantic_room_bbox_low_overlap_then_living_dining_split",
|
| 287 |
+
"rank": 1,
|
| 288 |
+
"scale_m_per_px": 0.07146,
|
| 289 |
+
"target_area_m2_before_clamp": 82.66,
|
| 290 |
+
"room_pixel_area": 16188,
|
| 291 |
+
"outline_m": [
|
| 292 |
+
0.0,
|
| 293 |
+
0.0,
|
| 294 |
+
10.933,
|
| 295 |
+
8.932
|
| 296 |
+
],
|
| 297 |
+
"raw_bbox_overlap_score": 0.0,
|
| 298 |
+
"final_bbox_overlap_score": 0.0,
|
| 299 |
+
"dining_source": "split_living",
|
| 300 |
+
"aspect_bin": "balanced"
|
| 301 |
+
},
|
| 302 |
+
"rplan_conversion_key_order": [
|
| 303 |
+
"method",
|
| 304 |
+
"rank",
|
| 305 |
+
"scale_m_per_px",
|
| 306 |
+
"target_area_m2_before_clamp",
|
| 307 |
+
"room_pixel_area",
|
| 308 |
+
"outline_px",
|
| 309 |
+
"outline_m",
|
| 310 |
+
"raw_bbox_overlap_score",
|
| 311 |
+
"final_bbox_overlap_score",
|
| 312 |
+
"dining_source",
|
| 313 |
+
"aspect_bin"
|
| 314 |
+
],
|
| 315 |
+
"rooms_recipe": [
|
| 316 |
+
{
|
| 317 |
+
"room_id": "kitchen",
|
| 318 |
+
"room_type": "kitchen",
|
| 319 |
+
"source_label": 2,
|
| 320 |
+
"residual_mm": [
|
| 321 |
+
0,
|
| 322 |
+
0,
|
| 323 |
+
0,
|
| 324 |
+
0
|
| 325 |
+
]
|
| 326 |
+
},
|
| 327 |
+
{
|
| 328 |
+
"room_id": "dining",
|
| 329 |
+
"room_type": "dining_room",
|
| 330 |
+
"source_label": 0,
|
| 331 |
+
"residual_mm": [
|
| 332 |
+
0,
|
| 333 |
+
-304,
|
| 334 |
+
-1,
|
| 335 |
+
0
|
| 336 |
+
]
|
| 337 |
+
},
|
| 338 |
+
{
|
| 339 |
+
"room_id": "bath",
|
| 340 |
+
"room_type": "bathroom",
|
| 341 |
+
"source_label": 3,
|
| 342 |
+
"residual_mm": [
|
| 343 |
+
0,
|
| 344 |
+
-75,
|
| 345 |
+
0,
|
| 346 |
+
75
|
| 347 |
+
]
|
| 348 |
+
},
|
| 349 |
+
{
|
| 350 |
+
"room_id": "master",
|
| 351 |
+
"room_type": "master_bedroom",
|
| 352 |
+
"source_label": 1,
|
| 353 |
+
"residual_mm": [
|
| 354 |
+
0,
|
| 355 |
+
0,
|
| 356 |
+
0,
|
| 357 |
+
0
|
| 358 |
+
]
|
| 359 |
+
},
|
| 360 |
+
{
|
| 361 |
+
"room_id": "living",
|
| 362 |
+
"room_type": "living_room",
|
| 363 |
+
"source_label": 0,
|
| 364 |
+
"residual_mm": [
|
| 365 |
+
0,
|
| 366 |
+
-1,
|
| 367 |
+
-1,
|
| 368 |
+
-304
|
| 369 |
+
]
|
| 370 |
+
},
|
| 371 |
+
{
|
| 372 |
+
"room_id": "guest",
|
| 373 |
+
"room_type": "guest_bedroom",
|
| 374 |
+
"source_label": 7,
|
| 375 |
+
"residual_mm": [
|
| 376 |
+
0,
|
| 377 |
+
0,
|
| 378 |
+
-1,
|
| 379 |
+
0
|
| 380 |
+
]
|
| 381 |
+
},
|
| 382 |
+
{
|
| 383 |
+
"room_id": "balcony",
|
| 384 |
+
"room_type": "balcony",
|
| 385 |
+
"source_label": 9,
|
| 386 |
+
"residual_mm": [
|
| 387 |
+
0,
|
| 388 |
+
0,
|
| 389 |
+
0,
|
| 390 |
+
0
|
| 391 |
+
]
|
| 392 |
+
}
|
| 393 |
+
],
|
| 394 |
+
"plan_fields": {
|
| 395 |
+
"plan_id": "rplan_constrained_78215_scene_011_v16_task_contract",
|
| 396 |
+
"open_room_type_pairs": [
|
| 397 |
+
[
|
| 398 |
+
"kitchen",
|
| 399 |
+
"dining_room"
|
| 400 |
+
],
|
| 401 |
+
[
|
| 402 |
+
"dining_room",
|
| 403 |
+
"living_room"
|
| 404 |
+
]
|
| 405 |
+
],
|
| 406 |
+
"wall_thickness_m": 0.2,
|
| 407 |
+
"wall_height_m": 1.35
|
| 408 |
+
}
|
| 409 |
+
},
|
| 410 |
+
{
|
| 411 |
+
"case": "scene_002",
|
| 412 |
+
"plan_id": "rplan_constrained_44500_scene_002_v16_task_contract",
|
| 413 |
+
"group": "A",
|
| 414 |
+
"library_file": "x_44500.json",
|
| 415 |
+
"wrapper": "w_1e0513e7d441",
|
| 416 |
+
"library_key_order": [
|
| 417 |
+
"schema",
|
| 418 |
+
"source",
|
| 419 |
+
"provenance",
|
| 420 |
+
"plan_count",
|
| 421 |
+
"plans"
|
| 422 |
+
],
|
| 423 |
+
"plan_key_order": [
|
| 424 |
+
"plan_id",
|
| 425 |
+
"rplan_source_png",
|
| 426 |
+
"rplan_source_file",
|
| 427 |
+
"rplan_labels_present",
|
| 428 |
+
"rplan_conversion",
|
| 429 |
+
"rooms",
|
| 430 |
+
"open_room_type_pairs",
|
| 431 |
+
"wall_thickness_m",
|
| 432 |
+
"wall_height_m",
|
| 433 |
+
"topology_adjacencies",
|
| 434 |
+
"doors",
|
| 435 |
+
"wall_generation",
|
| 436 |
+
"windows",
|
| 437 |
+
"local_fallback_seed_manifest"
|
| 438 |
+
],
|
| 439 |
+
"expected": {
|
| 440 |
+
"rooms_sha256": "c41fd9ed3edf9617495f1ca156f5dc5d60a60008f1fba6b391fc7f379f79c354",
|
| 441 |
+
"plan_core_sha256": "a550ebd87626bab12e30c92dda116396efa271967399907fcc8d25e9208228c7",
|
| 442 |
+
"plan_sha256": "a550ebd87626bab12e30c92dda116396efa271967399907fcc8d25e9208228c7"
|
| 443 |
+
},
|
| 444 |
+
"record": "44500",
|
| 445 |
+
"dining_side": "left",
|
| 446 |
+
"rplan_conversion": {
|
| 447 |
+
"method": "semantic_room_bbox_low_overlap_then_living_dining_split",
|
| 448 |
+
"rank": 2,
|
| 449 |
+
"scale_m_per_px": 0.08757,
|
| 450 |
+
"target_area_m2_before_clamp": 102.45,
|
| 451 |
+
"room_pixel_area": 13277,
|
| 452 |
+
"outline_m": [
|
| 453 |
+
0.0,
|
| 454 |
+
0.0,
|
| 455 |
+
8.845,
|
| 456 |
+
14.8
|
| 457 |
+
],
|
| 458 |
+
"raw_bbox_overlap_score": 0.0,
|
| 459 |
+
"final_bbox_overlap_score": 0.0,
|
| 460 |
+
"dining_source": "split_living",
|
| 461 |
+
"aspect_bin": "tall"
|
| 462 |
+
},
|
| 463 |
+
"rplan_conversion_key_order": [
|
| 464 |
+
"method",
|
| 465 |
+
"rank",
|
| 466 |
+
"scale_m_per_px",
|
| 467 |
+
"target_area_m2_before_clamp",
|
| 468 |
+
"room_pixel_area",
|
| 469 |
+
"outline_px",
|
| 470 |
+
"outline_m",
|
| 471 |
+
"raw_bbox_overlap_score",
|
| 472 |
+
"final_bbox_overlap_score",
|
| 473 |
+
"dining_source",
|
| 474 |
+
"aspect_bin"
|
| 475 |
+
],
|
| 476 |
+
"rooms_recipe": [
|
| 477 |
+
{
|
| 478 |
+
"room_id": "kitchen",
|
| 479 |
+
"room_type": "kitchen",
|
| 480 |
+
"source_label": 2,
|
| 481 |
+
"residual_mm": [
|
| 482 |
+
0,
|
| 483 |
+
0,
|
| 484 |
+
0,
|
| 485 |
+
0
|
| 486 |
+
]
|
| 487 |
+
},
|
| 488 |
+
{
|
| 489 |
+
"room_id": "dining",
|
| 490 |
+
"room_type": "dining_room",
|
| 491 |
+
"source_label": 0,
|
| 492 |
+
"residual_mm": [
|
| 493 |
+
0,
|
| 494 |
+
1,
|
| 495 |
+
325,
|
| 496 |
+
1
|
| 497 |
+
]
|
| 498 |
+
},
|
| 499 |
+
{
|
| 500 |
+
"room_id": "bath",
|
| 501 |
+
"room_type": "bathroom",
|
| 502 |
+
"source_label": 3,
|
| 503 |
+
"residual_mm": [
|
| 504 |
+
0,
|
| 505 |
+
0,
|
| 506 |
+
0,
|
| 507 |
+
0
|
| 508 |
+
]
|
| 509 |
+
},
|
| 510 |
+
{
|
| 511 |
+
"room_id": "master",
|
| 512 |
+
"room_type": "master_bedroom",
|
| 513 |
+
"source_label": 1,
|
| 514 |
+
"residual_mm": [
|
| 515 |
+
0,
|
| 516 |
+
0,
|
| 517 |
+
0,
|
| 518 |
+
1
|
| 519 |
+
]
|
| 520 |
+
},
|
| 521 |
+
{
|
| 522 |
+
"room_id": "living",
|
| 523 |
+
"room_type": "living_room",
|
| 524 |
+
"source_label": 0,
|
| 525 |
+
"residual_mm": [
|
| 526 |
+
325,
|
| 527 |
+
1,
|
| 528 |
+
0,
|
| 529 |
+
1
|
| 530 |
+
]
|
| 531 |
+
},
|
| 532 |
+
{
|
| 533 |
+
"room_id": "guest",
|
| 534 |
+
"room_type": "guest_bedroom",
|
| 535 |
+
"source_label": 7,
|
| 536 |
+
"residual_mm": [
|
| 537 |
+
1,
|
| 538 |
+
0,
|
| 539 |
+
0,
|
| 540 |
+
0
|
| 541 |
+
]
|
| 542 |
+
},
|
| 543 |
+
{
|
| 544 |
+
"room_id": "balcony",
|
| 545 |
+
"room_type": "balcony",
|
| 546 |
+
"source_label": 9,
|
| 547 |
+
"residual_mm": [
|
| 548 |
+
1,
|
| 549 |
+
1,
|
| 550 |
+
0,
|
| 551 |
+
1
|
| 552 |
+
]
|
| 553 |
+
}
|
| 554 |
+
],
|
| 555 |
+
"plan_fields": {
|
| 556 |
+
"plan_id": "rplan_constrained_44500_scene_002_v16_task_contract",
|
| 557 |
+
"open_room_type_pairs": [
|
| 558 |
+
[
|
| 559 |
+
"kitchen",
|
| 560 |
+
"dining_room"
|
| 561 |
+
],
|
| 562 |
+
[
|
| 563 |
+
"dining_room",
|
| 564 |
+
"living_room"
|
| 565 |
+
]
|
| 566 |
+
],
|
| 567 |
+
"wall_thickness_m": 0.2,
|
| 568 |
+
"wall_height_m": 1.35
|
| 569 |
+
}
|
| 570 |
+
},
|
| 571 |
+
{
|
| 572 |
+
"case": "scene_003",
|
| 573 |
+
"plan_id": "rplan_constrained_24777_scene_003_v16_task_contract",
|
| 574 |
+
"group": "A",
|
| 575 |
+
"library_file": "x_24777.json",
|
| 576 |
+
"wrapper": "w_1e0513e7d441",
|
| 577 |
+
"library_key_order": [
|
| 578 |
+
"schema",
|
| 579 |
+
"source",
|
| 580 |
+
"provenance",
|
| 581 |
+
"plan_count",
|
| 582 |
+
"plans"
|
| 583 |
+
],
|
| 584 |
+
"plan_key_order": [
|
| 585 |
+
"plan_id",
|
| 586 |
+
"rplan_source_png",
|
| 587 |
+
"rplan_source_file",
|
| 588 |
+
"rplan_labels_present",
|
| 589 |
+
"rplan_conversion",
|
| 590 |
+
"rooms",
|
| 591 |
+
"open_room_type_pairs",
|
| 592 |
+
"wall_thickness_m",
|
| 593 |
+
"wall_height_m",
|
| 594 |
+
"topology_adjacencies",
|
| 595 |
+
"doors",
|
| 596 |
+
"wall_generation",
|
| 597 |
+
"windows",
|
| 598 |
+
"local_fallback_seed_manifest"
|
| 599 |
+
],
|
| 600 |
+
"expected": {
|
| 601 |
+
"rooms_sha256": "413b9acd1788c80490bf7b5670fbc9fcd900087cf969112dc56b313081151511",
|
| 602 |
+
"plan_core_sha256": "7cd596fa0e45b8d7ee0959003ef9beb213321949df3268e7d2590edf818e292a",
|
| 603 |
+
"plan_sha256": "7cd596fa0e45b8d7ee0959003ef9beb213321949df3268e7d2590edf818e292a"
|
| 604 |
+
},
|
| 605 |
+
"record": "24777",
|
| 606 |
+
"dining_side": "bottom",
|
| 607 |
+
"rplan_conversion": {
|
| 608 |
+
"method": "semantic_room_bbox_low_overlap_then_living_dining_split",
|
| 609 |
+
"rank": 3,
|
| 610 |
+
"scale_m_per_px": 0.0759,
|
| 611 |
+
"target_area_m2_before_clamp": 97.25,
|
| 612 |
+
"room_pixel_area": 14637,
|
| 613 |
+
"outline_m": [
|
| 614 |
+
0.0,
|
| 615 |
+
0.0,
|
| 616 |
+
9.639,
|
| 617 |
+
14.8
|
| 618 |
+
],
|
| 619 |
+
"raw_bbox_overlap_score": 0.0,
|
| 620 |
+
"final_bbox_overlap_score": 0.06,
|
| 621 |
+
"dining_source": "split_living",
|
| 622 |
+
"aspect_bin": "tall"
|
| 623 |
+
},
|
| 624 |
+
"rplan_conversion_key_order": [
|
| 625 |
+
"method",
|
| 626 |
+
"rank",
|
| 627 |
+
"scale_m_per_px",
|
| 628 |
+
"target_area_m2_before_clamp",
|
| 629 |
+
"room_pixel_area",
|
| 630 |
+
"outline_px",
|
| 631 |
+
"outline_m",
|
| 632 |
+
"raw_bbox_overlap_score",
|
| 633 |
+
"final_bbox_overlap_score",
|
| 634 |
+
"dining_source",
|
| 635 |
+
"aspect_bin"
|
| 636 |
+
],
|
| 637 |
+
"rooms_recipe": [
|
| 638 |
+
{
|
| 639 |
+
"room_id": "kitchen",
|
| 640 |
+
"room_type": "kitchen",
|
| 641 |
+
"source_label": 2,
|
| 642 |
+
"residual_mm": [
|
| 643 |
+
0,
|
| 644 |
+
0,
|
| 645 |
+
0,
|
| 646 |
+
0
|
| 647 |
+
]
|
| 648 |
+
},
|
| 649 |
+
{
|
| 650 |
+
"room_id": "dining",
|
| 651 |
+
"room_type": "dining_room",
|
| 652 |
+
"source_label": 0,
|
| 653 |
+
"residual_mm": [
|
| 654 |
+
-1,
|
| 655 |
+
0,
|
| 656 |
+
0,
|
| 657 |
+
0
|
| 658 |
+
]
|
| 659 |
+
},
|
| 660 |
+
{
|
| 661 |
+
"room_id": "bath",
|
| 662 |
+
"room_type": "bathroom",
|
| 663 |
+
"source_label": 3,
|
| 664 |
+
"residual_mm": [
|
| 665 |
+
-67,
|
| 666 |
+
0,
|
| 667 |
+
65,
|
| 668 |
+
0
|
| 669 |
+
]
|
| 670 |
+
},
|
| 671 |
+
{
|
| 672 |
+
"room_id": "master",
|
| 673 |
+
"room_type": "master_bedroom",
|
| 674 |
+
"source_label": 1,
|
| 675 |
+
"residual_mm": [
|
| 676 |
+
0,
|
| 677 |
+
0,
|
| 678 |
+
0,
|
| 679 |
+
0
|
| 680 |
+
]
|
| 681 |
+
},
|
| 682 |
+
{
|
| 683 |
+
"room_id": "living",
|
| 684 |
+
"room_type": "living_room",
|
| 685 |
+
"source_label": 0,
|
| 686 |
+
"residual_mm": [
|
| 687 |
+
-1,
|
| 688 |
+
0,
|
| 689 |
+
0,
|
| 690 |
+
-1
|
| 691 |
+
]
|
| 692 |
+
},
|
| 693 |
+
{
|
| 694 |
+
"room_id": "guest",
|
| 695 |
+
"room_type": "guest_bedroom",
|
| 696 |
+
"source_label": 7,
|
| 697 |
+
"residual_mm": [
|
| 698 |
+
0,
|
| 699 |
+
0,
|
| 700 |
+
0,
|
| 701 |
+
-1
|
| 702 |
+
]
|
| 703 |
+
},
|
| 704 |
+
{
|
| 705 |
+
"room_id": "balcony",
|
| 706 |
+
"room_type": "balcony",
|
| 707 |
+
"source_label": 9,
|
| 708 |
+
"residual_mm": [
|
| 709 |
+
0,
|
| 710 |
+
-291,
|
| 711 |
+
0,
|
| 712 |
+
0
|
| 713 |
+
]
|
| 714 |
+
}
|
| 715 |
+
],
|
| 716 |
+
"plan_fields": {
|
| 717 |
+
"plan_id": "rplan_constrained_24777_scene_003_v16_task_contract",
|
| 718 |
+
"open_room_type_pairs": [
|
| 719 |
+
[
|
| 720 |
+
"kitchen",
|
| 721 |
+
"dining_room"
|
| 722 |
+
],
|
| 723 |
+
[
|
| 724 |
+
"dining_room",
|
| 725 |
+
"living_room"
|
| 726 |
+
]
|
| 727 |
+
],
|
| 728 |
+
"wall_thickness_m": 0.2,
|
| 729 |
+
"wall_height_m": 1.35
|
| 730 |
+
}
|
| 731 |
+
},
|
| 732 |
+
{
|
| 733 |
+
"case": "scene_004",
|
| 734 |
+
"plan_id": "rplan_constrained_42920_scene_009_v16_task_contract",
|
| 735 |
+
"group": "A",
|
| 736 |
+
"library_file": "x_42920.json",
|
| 737 |
+
"wrapper": "w_1e0513e7d441",
|
| 738 |
+
"library_key_order": [
|
| 739 |
+
"schema",
|
| 740 |
+
"source",
|
| 741 |
+
"provenance",
|
| 742 |
+
"plan_count",
|
| 743 |
+
"plans"
|
| 744 |
+
],
|
| 745 |
+
"plan_key_order": [
|
| 746 |
+
"plan_id",
|
| 747 |
+
"rplan_source_png",
|
| 748 |
+
"rplan_source_file",
|
| 749 |
+
"rplan_labels_present",
|
| 750 |
+
"rplan_conversion",
|
| 751 |
+
"rooms",
|
| 752 |
+
"open_room_type_pairs",
|
| 753 |
+
"wall_thickness_m",
|
| 754 |
+
"wall_height_m",
|
| 755 |
+
"topology_adjacencies",
|
| 756 |
+
"doors",
|
| 757 |
+
"wall_generation",
|
| 758 |
+
"windows",
|
| 759 |
+
"local_fallback_seed_manifest"
|
| 760 |
+
],
|
| 761 |
+
"expected": {
|
| 762 |
+
"rooms_sha256": "f840c247ec70ad557c896f37f5abb16a395af9fabd5887c60119f28b852e189c",
|
| 763 |
+
"plan_core_sha256": "e885612fccf4361b1d60c8963450cc837312f74d62f9928d0863489f22de574a",
|
| 764 |
+
"plan_sha256": "e885612fccf4361b1d60c8963450cc837312f74d62f9928d0863489f22de574a"
|
| 765 |
+
},
|
| 766 |
+
"record": "42920",
|
| 767 |
+
"dining_side": "left",
|
| 768 |
+
"rplan_conversion": {
|
| 769 |
+
"method": "semantic_room_bbox_low_overlap_then_living_dining_split",
|
| 770 |
+
"rank": 4,
|
| 771 |
+
"scale_m_per_px": 0.08177,
|
| 772 |
+
"target_area_m2_before_clamp": 88.15,
|
| 773 |
+
"room_pixel_area": 13184,
|
| 774 |
+
"outline_m": [
|
| 775 |
+
0.0,
|
| 776 |
+
0.0,
|
| 777 |
+
8.422,
|
| 778 |
+
13.819
|
| 779 |
+
],
|
| 780 |
+
"raw_bbox_overlap_score": 0.0,
|
| 781 |
+
"final_bbox_overlap_score": 0.0,
|
| 782 |
+
"dining_source": "split_living",
|
| 783 |
+
"aspect_bin": "tall"
|
| 784 |
+
},
|
| 785 |
+
"rplan_conversion_key_order": [
|
| 786 |
+
"method",
|
| 787 |
+
"rank",
|
| 788 |
+
"scale_m_per_px",
|
| 789 |
+
"target_area_m2_before_clamp",
|
| 790 |
+
"room_pixel_area",
|
| 791 |
+
"outline_px",
|
| 792 |
+
"outline_m",
|
| 793 |
+
"raw_bbox_overlap_score",
|
| 794 |
+
"final_bbox_overlap_score",
|
| 795 |
+
"dining_source",
|
| 796 |
+
"aspect_bin"
|
| 797 |
+
],
|
| 798 |
+
"rooms_recipe": [
|
| 799 |
+
{
|
| 800 |
+
"room_id": "kitchen",
|
| 801 |
+
"room_type": "kitchen",
|
| 802 |
+
"source_label": 2,
|
| 803 |
+
"residual_mm": [
|
| 804 |
+
0,
|
| 805 |
+
0,
|
| 806 |
+
0,
|
| 807 |
+
0
|
| 808 |
+
]
|
| 809 |
+
},
|
| 810 |
+
{
|
| 811 |
+
"room_id": "dining",
|
| 812 |
+
"room_type": "dining_room",
|
| 813 |
+
"source_label": 0,
|
| 814 |
+
"residual_mm": [
|
| 815 |
+
0,
|
| 816 |
+
0,
|
| 817 |
+
70,
|
| 818 |
+
0
|
| 819 |
+
]
|
| 820 |
+
},
|
| 821 |
+
{
|
| 822 |
+
"room_id": "bath",
|
| 823 |
+
"room_type": "bathroom",
|
| 824 |
+
"source_label": 3,
|
| 825 |
+
"residual_mm": [
|
| 826 |
+
0,
|
| 827 |
+
0,
|
| 828 |
+
-1,
|
| 829 |
+
0
|
| 830 |
+
]
|
| 831 |
+
},
|
| 832 |
+
{
|
| 833 |
+
"room_id": "master",
|
| 834 |
+
"room_type": "master_bedroom",
|
| 835 |
+
"source_label": 1,
|
| 836 |
+
"residual_mm": [
|
| 837 |
+
0,
|
| 838 |
+
0,
|
| 839 |
+
0,
|
| 840 |
+
0
|
| 841 |
+
]
|
| 842 |
+
},
|
| 843 |
+
{
|
| 844 |
+
"room_id": "living",
|
| 845 |
+
"room_type": "living_room",
|
| 846 |
+
"source_label": 0,
|
| 847 |
+
"residual_mm": [
|
| 848 |
+
70,
|
| 849 |
+
0,
|
| 850 |
+
0,
|
| 851 |
+
0
|
| 852 |
+
]
|
| 853 |
+
},
|
| 854 |
+
{
|
| 855 |
+
"room_id": "guest",
|
| 856 |
+
"room_type": "guest_bedroom",
|
| 857 |
+
"source_label": 7,
|
| 858 |
+
"residual_mm": [
|
| 859 |
+
0,
|
| 860 |
+
0,
|
| 861 |
+
0,
|
| 862 |
+
0
|
| 863 |
+
]
|
| 864 |
+
},
|
| 865 |
+
{
|
| 866 |
+
"room_id": "balcony",
|
| 867 |
+
"room_type": "balcony",
|
| 868 |
+
"source_label": 9,
|
| 869 |
+
"residual_mm": [
|
| 870 |
+
0,
|
| 871 |
+
0,
|
| 872 |
+
0,
|
| 873 |
+
69
|
| 874 |
+
]
|
| 875 |
+
}
|
| 876 |
+
],
|
| 877 |
+
"plan_fields": {
|
| 878 |
+
"plan_id": "rplan_constrained_42920_scene_009_v16_task_contract",
|
| 879 |
+
"open_room_type_pairs": [
|
| 880 |
+
[
|
| 881 |
+
"kitchen",
|
| 882 |
+
"dining_room"
|
| 883 |
+
],
|
| 884 |
+
[
|
| 885 |
+
"dining_room",
|
| 886 |
+
"living_room"
|
| 887 |
+
]
|
| 888 |
+
],
|
| 889 |
+
"wall_thickness_m": 0.2,
|
| 890 |
+
"wall_height_m": 1.35
|
| 891 |
+
}
|
| 892 |
+
},
|
| 893 |
+
{
|
| 894 |
+
"case": "scene_005",
|
| 895 |
+
"plan_id": "rplan_graph2plan_44838",
|
| 896 |
+
"group": "B",
|
| 897 |
+
"library_file": "x_44838.json",
|
| 898 |
+
"wrapper": "w_1e0513e7d441",
|
| 899 |
+
"library_key_order": [
|
| 900 |
+
"schema",
|
| 901 |
+
"source",
|
| 902 |
+
"provenance",
|
| 903 |
+
"plan_count",
|
| 904 |
+
"plans"
|
| 905 |
+
],
|
| 906 |
+
"plan_key_order": [
|
| 907 |
+
"plan_id",
|
| 908 |
+
"rplan_source_file",
|
| 909 |
+
"rplan_source_id",
|
| 910 |
+
"rplan_labels_present",
|
| 911 |
+
"rplan_conversion",
|
| 912 |
+
"rooms",
|
| 913 |
+
"open_room_type_pairs",
|
| 914 |
+
"wall_thickness_m",
|
| 915 |
+
"wall_height_m",
|
| 916 |
+
"topology_adjacencies",
|
| 917 |
+
"doors",
|
| 918 |
+
"wall_generation",
|
| 919 |
+
"windows"
|
| 920 |
+
],
|
| 921 |
+
"expected": {
|
| 922 |
+
"rooms_sha256": "c91bbd8644731b5608475051e41f808824511eb816ffdfefa2447a5b579b9bd9",
|
| 923 |
+
"plan_core_sha256": "366f15722bb68a585c656bd243e8409d7c12132ea36aa5d2223435f1318888b0",
|
| 924 |
+
"plan_sha256": "7b75ed1f9355de6a6404ee864816a9c960c0c36a470171b1f811d0e806d53097"
|
| 925 |
+
},
|
| 926 |
+
"record": "44838",
|
| 927 |
+
"dining_side": "right"
|
| 928 |
+
},
|
| 929 |
+
{
|
| 930 |
+
"case": "scene_006",
|
| 931 |
+
"plan_id": "rplan_graph2plan_65877",
|
| 932 |
+
"group": "B",
|
| 933 |
+
"library_file": "x_65877.json",
|
| 934 |
+
"wrapper": "w_1e0513e7d441",
|
| 935 |
+
"library_key_order": [
|
| 936 |
+
"schema",
|
| 937 |
+
"source",
|
| 938 |
+
"provenance",
|
| 939 |
+
"plan_count",
|
| 940 |
+
"plans"
|
| 941 |
+
],
|
| 942 |
+
"plan_key_order": [
|
| 943 |
+
"plan_id",
|
| 944 |
+
"rplan_source_file",
|
| 945 |
+
"rplan_source_id",
|
| 946 |
+
"rplan_labels_present",
|
| 947 |
+
"rplan_conversion",
|
| 948 |
+
"rooms",
|
| 949 |
+
"open_room_type_pairs",
|
| 950 |
+
"wall_thickness_m",
|
| 951 |
+
"wall_height_m",
|
| 952 |
+
"topology_adjacencies",
|
| 953 |
+
"doors",
|
| 954 |
+
"wall_generation",
|
| 955 |
+
"windows"
|
| 956 |
+
],
|
| 957 |
+
"expected": {
|
| 958 |
+
"rooms_sha256": "bbc59aa84353678f54d0886c4c5b3657db262283f36abb6ad24affaf6b04852c",
|
| 959 |
+
"plan_core_sha256": "f097cb892e99c2123c04dfaaa1a18a0f7f7aafea48f4b07b74761fd36908a0a1",
|
| 960 |
+
"plan_sha256": "59abc4f3f085565fb9cfa7181bd8c27117b76bae1ef88a1151d7dac9fb4d85f9"
|
| 961 |
+
},
|
| 962 |
+
"record": "65877",
|
| 963 |
+
"dining_side": "top"
|
| 964 |
+
},
|
| 965 |
+
{
|
| 966 |
+
"case": "scene_007",
|
| 967 |
+
"plan_id": "rplan_graph2plan_66696",
|
| 968 |
+
"group": "B",
|
| 969 |
+
"library_file": "x_66696.json",
|
| 970 |
+
"wrapper": "w_1e0513e7d441",
|
| 971 |
+
"library_key_order": [
|
| 972 |
+
"schema",
|
| 973 |
+
"source",
|
| 974 |
+
"provenance",
|
| 975 |
+
"plan_count",
|
| 976 |
+
"plans"
|
| 977 |
+
],
|
| 978 |
+
"plan_key_order": [
|
| 979 |
+
"plan_id",
|
| 980 |
+
"rplan_source_file",
|
| 981 |
+
"rplan_source_id",
|
| 982 |
+
"rplan_labels_present",
|
| 983 |
+
"rplan_conversion",
|
| 984 |
+
"rooms",
|
| 985 |
+
"open_room_type_pairs",
|
| 986 |
+
"wall_thickness_m",
|
| 987 |
+
"wall_height_m",
|
| 988 |
+
"topology_adjacencies",
|
| 989 |
+
"doors",
|
| 990 |
+
"wall_generation",
|
| 991 |
+
"windows"
|
| 992 |
+
],
|
| 993 |
+
"expected": {
|
| 994 |
+
"rooms_sha256": "02e5daa0bf38b1dceb5bc11f65e1f7b98b322a7762cd27a0fae1eb4f886efc69",
|
| 995 |
+
"plan_core_sha256": "95f48c386833d7e1c34771a85a30a6d9cb15604ca080dbb4a96cdfe6c7300a9d",
|
| 996 |
+
"plan_sha256": "0e395648c7a57bdd89dda11b2a89556fd3773674f1aafff4c3ad68cc965d205b"
|
| 997 |
+
},
|
| 998 |
+
"record": "66696",
|
| 999 |
+
"dining_side": "left"
|
| 1000 |
+
},
|
| 1001 |
+
{
|
| 1002 |
+
"case": "scene_008",
|
| 1003 |
+
"plan_id": "rplan_graph2plan_71597",
|
| 1004 |
+
"group": "B",
|
| 1005 |
+
"library_file": "x_71597.json",
|
| 1006 |
+
"wrapper": "w_1e0513e7d441",
|
| 1007 |
+
"library_key_order": [
|
| 1008 |
+
"schema",
|
| 1009 |
+
"source",
|
| 1010 |
+
"provenance",
|
| 1011 |
+
"plan_count",
|
| 1012 |
+
"plans"
|
| 1013 |
+
],
|
| 1014 |
+
"plan_key_order": [
|
| 1015 |
+
"plan_id",
|
| 1016 |
+
"rplan_source_file",
|
| 1017 |
+
"rplan_source_id",
|
| 1018 |
+
"rplan_labels_present",
|
| 1019 |
+
"rplan_conversion",
|
| 1020 |
+
"rooms",
|
| 1021 |
+
"open_room_type_pairs",
|
| 1022 |
+
"wall_thickness_m",
|
| 1023 |
+
"wall_height_m",
|
| 1024 |
+
"topology_adjacencies",
|
| 1025 |
+
"doors",
|
| 1026 |
+
"wall_generation",
|
| 1027 |
+
"windows"
|
| 1028 |
+
],
|
| 1029 |
+
"expected": {
|
| 1030 |
+
"rooms_sha256": "d2e27bcc432a6d063a9a93f4378bb23ed6a144231c7e10e35773813f2b67cfc5",
|
| 1031 |
+
"plan_core_sha256": "b7d962c459026b82ee346046736ae2139eb839c5cf344a9bd147e4095d304a2b",
|
| 1032 |
+
"plan_sha256": "7da759d727e22e752b9216af691459e71138304e5864e2bd05fdd815877381f5"
|
| 1033 |
+
},
|
| 1034 |
+
"record": "71597",
|
| 1035 |
+
"dining_side": "bottom"
|
| 1036 |
+
},
|
| 1037 |
+
{
|
| 1038 |
+
"case": "scene_009",
|
| 1039 |
+
"plan_id": "rplan_graph2plan_778",
|
| 1040 |
+
"group": "B",
|
| 1041 |
+
"library_file": "x_778.json",
|
| 1042 |
+
"wrapper": "w_1e0513e7d441",
|
| 1043 |
+
"library_key_order": [
|
| 1044 |
+
"schema",
|
| 1045 |
+
"source",
|
| 1046 |
+
"provenance",
|
| 1047 |
+
"plan_count",
|
| 1048 |
+
"plans"
|
| 1049 |
+
],
|
| 1050 |
+
"plan_key_order": [
|
| 1051 |
+
"plan_id",
|
| 1052 |
+
"rplan_source_file",
|
| 1053 |
+
"rplan_source_id",
|
| 1054 |
+
"rplan_labels_present",
|
| 1055 |
+
"rplan_conversion",
|
| 1056 |
+
"rooms",
|
| 1057 |
+
"open_room_type_pairs",
|
| 1058 |
+
"wall_thickness_m",
|
| 1059 |
+
"wall_height_m",
|
| 1060 |
+
"topology_adjacencies",
|
| 1061 |
+
"doors",
|
| 1062 |
+
"wall_generation",
|
| 1063 |
+
"windows"
|
| 1064 |
+
],
|
| 1065 |
+
"expected": {
|
| 1066 |
+
"rooms_sha256": "6a9443d48e698871a316687bd97bf547f623e18d4404d2d974c005134ce410fc",
|
| 1067 |
+
"plan_core_sha256": "f4d19f75b0c5567187abc1a9d133d06ead5ad62ab1160fc3531a323e96a1185c",
|
| 1068 |
+
"plan_sha256": "852d6b1fdde62c09e0207054667b62d5e107753a59fd516aff87e0120d3ab78e"
|
| 1069 |
+
},
|
| 1070 |
+
"record": "778",
|
| 1071 |
+
"dining_side": "left"
|
| 1072 |
+
},
|
| 1073 |
+
{
|
| 1074 |
+
"case": "scene_010",
|
| 1075 |
+
"plan_id": "rplan_graph2plan_7591",
|
| 1076 |
+
"group": "B",
|
| 1077 |
+
"library_file": "x_7591.json",
|
| 1078 |
+
"wrapper": "w_1e0513e7d441",
|
| 1079 |
+
"library_key_order": [
|
| 1080 |
+
"schema",
|
| 1081 |
+
"source",
|
| 1082 |
+
"provenance",
|
| 1083 |
+
"plan_count",
|
| 1084 |
+
"plans"
|
| 1085 |
+
],
|
| 1086 |
+
"plan_key_order": [
|
| 1087 |
+
"plan_id",
|
| 1088 |
+
"rplan_source_file",
|
| 1089 |
+
"rplan_source_id",
|
| 1090 |
+
"rplan_labels_present",
|
| 1091 |
+
"rplan_conversion",
|
| 1092 |
+
"rooms",
|
| 1093 |
+
"open_room_type_pairs",
|
| 1094 |
+
"wall_thickness_m",
|
| 1095 |
+
"wall_height_m",
|
| 1096 |
+
"topology_adjacencies",
|
| 1097 |
+
"doors",
|
| 1098 |
+
"wall_generation",
|
| 1099 |
+
"windows"
|
| 1100 |
+
],
|
| 1101 |
+
"expected": {
|
| 1102 |
+
"rooms_sha256": "f0911bcc01b9d21790216f888ea3e376196e080dc7a9d77d7dcc2419c2f36f42",
|
| 1103 |
+
"plan_core_sha256": "a631d7ba061da0a075da090819f0ae08cd9b529d3ac2b0fb61df596710f39445",
|
| 1104 |
+
"plan_sha256": "960c44e94c283cec0e326cdb55f55e1bd819851da178858a2d99b69142941b58"
|
| 1105 |
+
},
|
| 1106 |
+
"record": "7591",
|
| 1107 |
+
"dining_side": "right"
|
| 1108 |
+
},
|
| 1109 |
+
{
|
| 1110 |
+
"case": "scene_011",
|
| 1111 |
+
"plan_id": "rplan_graph2plan_7688",
|
| 1112 |
+
"group": "B",
|
| 1113 |
+
"library_file": "x_7688.json",
|
| 1114 |
+
"wrapper": "w_1e0513e7d441",
|
| 1115 |
+
"library_key_order": [
|
| 1116 |
+
"schema",
|
| 1117 |
+
"source",
|
| 1118 |
+
"provenance",
|
| 1119 |
+
"plan_count",
|
| 1120 |
+
"plans"
|
| 1121 |
+
],
|
| 1122 |
+
"plan_key_order": [
|
| 1123 |
+
"plan_id",
|
| 1124 |
+
"rplan_source_file",
|
| 1125 |
+
"rplan_source_id",
|
| 1126 |
+
"rplan_labels_present",
|
| 1127 |
+
"rplan_conversion",
|
| 1128 |
+
"rooms",
|
| 1129 |
+
"open_room_type_pairs",
|
| 1130 |
+
"wall_thickness_m",
|
| 1131 |
+
"wall_height_m",
|
| 1132 |
+
"topology_adjacencies",
|
| 1133 |
+
"doors",
|
| 1134 |
+
"wall_generation",
|
| 1135 |
+
"windows"
|
| 1136 |
+
],
|
| 1137 |
+
"expected": {
|
| 1138 |
+
"rooms_sha256": "d83a6e70da8b762785722c1e0661b49b932140cd685f69df799367f0b90367d1",
|
| 1139 |
+
"plan_core_sha256": "5eeab5b014a74902ff650952d587b0a33689834c5658a4e47610ea26e6e5b96b",
|
| 1140 |
+
"plan_sha256": "a038aa2830f0eb6359c80be11c2d3b880f2805d943c26b98c0baed54a7e7b1fb"
|
| 1141 |
+
},
|
| 1142 |
+
"record": "7688",
|
| 1143 |
+
"dining_side": "left"
|
| 1144 |
+
},
|
| 1145 |
+
{
|
| 1146 |
+
"case": "scene_012",
|
| 1147 |
+
"plan_id": "rplan_graph2plan_9771",
|
| 1148 |
+
"group": "B",
|
| 1149 |
+
"library_file": "x_9771.json",
|
| 1150 |
+
"wrapper": "w_1e0513e7d441",
|
| 1151 |
+
"library_key_order": [
|
| 1152 |
+
"schema",
|
| 1153 |
+
"source",
|
| 1154 |
+
"provenance",
|
| 1155 |
+
"plan_count",
|
| 1156 |
+
"plans"
|
| 1157 |
+
],
|
| 1158 |
+
"plan_key_order": [
|
| 1159 |
+
"plan_id",
|
| 1160 |
+
"rplan_source_file",
|
| 1161 |
+
"rplan_source_id",
|
| 1162 |
+
"rplan_labels_present",
|
| 1163 |
+
"rplan_conversion",
|
| 1164 |
+
"rooms",
|
| 1165 |
+
"open_room_type_pairs",
|
| 1166 |
+
"wall_thickness_m",
|
| 1167 |
+
"wall_height_m",
|
| 1168 |
+
"topology_adjacencies",
|
| 1169 |
+
"doors",
|
| 1170 |
+
"wall_generation",
|
| 1171 |
+
"windows"
|
| 1172 |
+
],
|
| 1173 |
+
"expected": {
|
| 1174 |
+
"rooms_sha256": "5134583bf753d46e17aaf9804c0604841d6b7bb9b0c74aa7583107d1887e0c0d",
|
| 1175 |
+
"plan_core_sha256": "db245c413cf669b02e3d912bd55820b15b38eea8636e4ad5adb312faff5f210c",
|
| 1176 |
+
"plan_sha256": "282fd8cce11384cfade45b2a700b6c6b6e4a67bbc8fadee847dabbcf44c1e0e3"
|
| 1177 |
+
},
|
| 1178 |
+
"record": "9771",
|
| 1179 |
+
"dining_side": "bottom"
|
| 1180 |
+
},
|
| 1181 |
+
{
|
| 1182 |
+
"case": "scene_013",
|
| 1183 |
+
"plan_id": "rplan_graph2plan_13395",
|
| 1184 |
+
"group": "B",
|
| 1185 |
+
"library_file": "x_13395.json",
|
| 1186 |
+
"wrapper": "w_1e0513e7d441",
|
| 1187 |
+
"library_key_order": [
|
| 1188 |
+
"schema",
|
| 1189 |
+
"source",
|
| 1190 |
+
"provenance",
|
| 1191 |
+
"plan_count",
|
| 1192 |
+
"plans"
|
| 1193 |
+
],
|
| 1194 |
+
"plan_key_order": [
|
| 1195 |
+
"plan_id",
|
| 1196 |
+
"rplan_source_file",
|
| 1197 |
+
"rplan_source_id",
|
| 1198 |
+
"rplan_labels_present",
|
| 1199 |
+
"rplan_conversion",
|
| 1200 |
+
"rooms",
|
| 1201 |
+
"open_room_type_pairs",
|
| 1202 |
+
"wall_thickness_m",
|
| 1203 |
+
"wall_height_m",
|
| 1204 |
+
"topology_adjacencies",
|
| 1205 |
+
"doors",
|
| 1206 |
+
"wall_generation",
|
| 1207 |
+
"windows"
|
| 1208 |
+
],
|
| 1209 |
+
"expected": {
|
| 1210 |
+
"rooms_sha256": "48a319449f68a58dafe6c432bfb71a0aa0b4ceb6a429d5445983104f3b99947a",
|
| 1211 |
+
"plan_core_sha256": "ff45e1be3c06e331901a6c85c86f8c545f8c3d5da82f1a212318d1c3ddcac0a6",
|
| 1212 |
+
"plan_sha256": "4cf06967b7a499e60a45ade357a11b169e3ac28146f89d808bccff54d0d21d21"
|
| 1213 |
+
},
|
| 1214 |
+
"record": "13395",
|
| 1215 |
+
"dining_side": "left"
|
| 1216 |
+
},
|
| 1217 |
+
{
|
| 1218 |
+
"case": "scene_014",
|
| 1219 |
+
"plan_id": "rplan_graph2plan_14143",
|
| 1220 |
+
"group": "B",
|
| 1221 |
+
"library_file": "x_14143.json",
|
| 1222 |
+
"wrapper": "w_1e0513e7d441",
|
| 1223 |
+
"library_key_order": [
|
| 1224 |
+
"schema",
|
| 1225 |
+
"source",
|
| 1226 |
+
"provenance",
|
| 1227 |
+
"plan_count",
|
| 1228 |
+
"plans"
|
| 1229 |
+
],
|
| 1230 |
+
"plan_key_order": [
|
| 1231 |
+
"plan_id",
|
| 1232 |
+
"rplan_source_file",
|
| 1233 |
+
"rplan_source_id",
|
| 1234 |
+
"rplan_labels_present",
|
| 1235 |
+
"rplan_conversion",
|
| 1236 |
+
"rooms",
|
| 1237 |
+
"open_room_type_pairs",
|
| 1238 |
+
"wall_thickness_m",
|
| 1239 |
+
"wall_height_m",
|
| 1240 |
+
"topology_adjacencies",
|
| 1241 |
+
"doors",
|
| 1242 |
+
"wall_generation",
|
| 1243 |
+
"windows"
|
| 1244 |
+
],
|
| 1245 |
+
"expected": {
|
| 1246 |
+
"rooms_sha256": "a664fece7cf955c8f2d5755072f7a41bbc6931a44c728f11e8be9474b18245b8",
|
| 1247 |
+
"plan_core_sha256": "339a1ff19b41e7b34883119c88dd92922591c7696e34d5745dd5a8e014c0b5af",
|
| 1248 |
+
"plan_sha256": "5a06cf5367c6cc1b7d8b44829bbf8b6e07eb66947b6b86d671d34ddc07606dca"
|
| 1249 |
+
},
|
| 1250 |
+
"record": "14143",
|
| 1251 |
+
"dining_side": "bottom"
|
| 1252 |
+
},
|
| 1253 |
+
{
|
| 1254 |
+
"case": "scene_015",
|
| 1255 |
+
"plan_id": "rplan_graph2plan_14903",
|
| 1256 |
+
"group": "B",
|
| 1257 |
+
"library_file": "x_14903.json",
|
| 1258 |
+
"wrapper": "w_1e0513e7d441",
|
| 1259 |
+
"library_key_order": [
|
| 1260 |
+
"schema",
|
| 1261 |
+
"source",
|
| 1262 |
+
"provenance",
|
| 1263 |
+
"plan_count",
|
| 1264 |
+
"plans"
|
| 1265 |
+
],
|
| 1266 |
+
"plan_key_order": [
|
| 1267 |
+
"plan_id",
|
| 1268 |
+
"rplan_source_file",
|
| 1269 |
+
"rplan_source_id",
|
| 1270 |
+
"rplan_labels_present",
|
| 1271 |
+
"rplan_conversion",
|
| 1272 |
+
"rooms",
|
| 1273 |
+
"open_room_type_pairs",
|
| 1274 |
+
"wall_thickness_m",
|
| 1275 |
+
"wall_height_m",
|
| 1276 |
+
"topology_adjacencies",
|
| 1277 |
+
"doors",
|
| 1278 |
+
"wall_generation",
|
| 1279 |
+
"windows"
|
| 1280 |
+
],
|
| 1281 |
+
"expected": {
|
| 1282 |
+
"rooms_sha256": "37ecbd89811ee1249c8ad81972096a3ad99290e42ff22893633dc7eae265d201",
|
| 1283 |
+
"plan_core_sha256": "3ef031ef08a6e180bb1f38c52083d65005407e98bae1474a24c938b22cf6370d",
|
| 1284 |
+
"plan_sha256": "89bf0363f5a4b0de0c7665daac3adabe5fcc5275d4d3d74bd4777a24724ec461"
|
| 1285 |
+
},
|
| 1286 |
+
"record": "14903",
|
| 1287 |
+
"dining_side": "right"
|
| 1288 |
+
},
|
| 1289 |
+
{
|
| 1290 |
+
"case": "scene_016",
|
| 1291 |
+
"plan_id": "rplan_graph2plan_19207",
|
| 1292 |
+
"group": "B",
|
| 1293 |
+
"library_file": "x_19207.json",
|
| 1294 |
+
"wrapper": "w_1e0513e7d441",
|
| 1295 |
+
"library_key_order": [
|
| 1296 |
+
"schema",
|
| 1297 |
+
"source",
|
| 1298 |
+
"provenance",
|
| 1299 |
+
"plan_count",
|
| 1300 |
+
"plans"
|
| 1301 |
+
],
|
| 1302 |
+
"plan_key_order": [
|
| 1303 |
+
"plan_id",
|
| 1304 |
+
"rplan_source_file",
|
| 1305 |
+
"rplan_source_id",
|
| 1306 |
+
"rplan_labels_present",
|
| 1307 |
+
"rplan_conversion",
|
| 1308 |
+
"rooms",
|
| 1309 |
+
"open_room_type_pairs",
|
| 1310 |
+
"wall_thickness_m",
|
| 1311 |
+
"wall_height_m",
|
| 1312 |
+
"topology_adjacencies",
|
| 1313 |
+
"doors",
|
| 1314 |
+
"wall_generation",
|
| 1315 |
+
"windows"
|
| 1316 |
+
],
|
| 1317 |
+
"expected": {
|
| 1318 |
+
"rooms_sha256": "0274c0539ae96190c8d3703f01b9b907a779e99429e3c238825fe7ff8bf9dd64",
|
| 1319 |
+
"plan_core_sha256": "0b9a22933137cff00006000f9228fa0a0405495c8dff88864f25510ae48208d7",
|
| 1320 |
+
"plan_sha256": "aec23e1030198590f016c3e1230648f58d724537d60843a44d1f11e190ca8671"
|
| 1321 |
+
},
|
| 1322 |
+
"record": "19207",
|
| 1323 |
+
"dining_side": "top"
|
| 1324 |
+
},
|
| 1325 |
+
{
|
| 1326 |
+
"case": "scene_017",
|
| 1327 |
+
"plan_id": "rplan_graph2plan_24727",
|
| 1328 |
+
"group": "B",
|
| 1329 |
+
"library_file": "x_24727.json",
|
| 1330 |
+
"wrapper": "w_1e0513e7d441",
|
| 1331 |
+
"library_key_order": [
|
| 1332 |
+
"schema",
|
| 1333 |
+
"source",
|
| 1334 |
+
"provenance",
|
| 1335 |
+
"plan_count",
|
| 1336 |
+
"plans"
|
| 1337 |
+
],
|
| 1338 |
+
"plan_key_order": [
|
| 1339 |
+
"plan_id",
|
| 1340 |
+
"rplan_source_file",
|
| 1341 |
+
"rplan_source_id",
|
| 1342 |
+
"rplan_labels_present",
|
| 1343 |
+
"rplan_conversion",
|
| 1344 |
+
"rooms",
|
| 1345 |
+
"open_room_type_pairs",
|
| 1346 |
+
"wall_thickness_m",
|
| 1347 |
+
"wall_height_m",
|
| 1348 |
+
"topology_adjacencies",
|
| 1349 |
+
"doors",
|
| 1350 |
+
"wall_generation",
|
| 1351 |
+
"windows"
|
| 1352 |
+
],
|
| 1353 |
+
"expected": {
|
| 1354 |
+
"rooms_sha256": "5496c3a0b7e748782159f48bebb094d118ac95dc0a1286561526288a91ee69bf",
|
| 1355 |
+
"plan_core_sha256": "0f82fb01bfb2d9e9383d98d4fb73a8292b3802a29983f8371df7e7174b1558b4",
|
| 1356 |
+
"plan_sha256": "eca417d728d339606af53b3c678161b38e31556f51c629225fbd4e55f8e41168"
|
| 1357 |
+
},
|
| 1358 |
+
"record": "24727",
|
| 1359 |
+
"dining_side": "right"
|
| 1360 |
+
},
|
| 1361 |
+
{
|
| 1362 |
+
"case": "scene_018",
|
| 1363 |
+
"plan_id": "rplan_graph2plan_26376",
|
| 1364 |
+
"group": "C",
|
| 1365 |
+
"library_file": "x_26376.json",
|
| 1366 |
+
"wrapper": "w_3b47d637bcdc",
|
| 1367 |
+
"library_key_order": [
|
| 1368 |
+
"schema",
|
| 1369 |
+
"source",
|
| 1370 |
+
"source_record_count",
|
| 1371 |
+
"options",
|
| 1372 |
+
"screened_count",
|
| 1373 |
+
"screening_options",
|
| 1374 |
+
"plan_count",
|
| 1375 |
+
"plans"
|
| 1376 |
+
],
|
| 1377 |
+
"plan_key_order": [
|
| 1378 |
+
"plan_id",
|
| 1379 |
+
"rplan_source_file",
|
| 1380 |
+
"rplan_source_id",
|
| 1381 |
+
"rplan_labels_present",
|
| 1382 |
+
"rplan_conversion",
|
| 1383 |
+
"rooms",
|
| 1384 |
+
"open_room_type_pairs",
|
| 1385 |
+
"wall_thickness_m",
|
| 1386 |
+
"wall_height_m",
|
| 1387 |
+
"rplan_screening"
|
| 1388 |
+
],
|
| 1389 |
+
"expected": {
|
| 1390 |
+
"rooms_sha256": "44505d1d05e2e597b267726f519453a7e0cf1dc0bec9a49f6c08b9405b05a681",
|
| 1391 |
+
"plan_core_sha256": "f78afb21898a759fc4287dd46ec71f377238a11b1552abbd6a1d5a7d473e2a9d",
|
| 1392 |
+
"plan_sha256": "f78afb21898a759fc4287dd46ec71f377238a11b1552abbd6a1d5a7d473e2a9d"
|
| 1393 |
+
},
|
| 1394 |
+
"record": "26376"
|
| 1395 |
+
},
|
| 1396 |
+
{
|
| 1397 |
+
"case": "scene_019",
|
| 1398 |
+
"plan_id": "rplan_graph2plan_28571",
|
| 1399 |
+
"group": "B",
|
| 1400 |
+
"library_file": "x_28571.json",
|
| 1401 |
+
"wrapper": "w_1e0513e7d441",
|
| 1402 |
+
"library_key_order": [
|
| 1403 |
+
"schema",
|
| 1404 |
+
"source",
|
| 1405 |
+
"provenance",
|
| 1406 |
+
"plan_count",
|
| 1407 |
+
"plans"
|
| 1408 |
+
],
|
| 1409 |
+
"plan_key_order": [
|
| 1410 |
+
"plan_id",
|
| 1411 |
+
"rplan_source_file",
|
| 1412 |
+
"rplan_source_id",
|
| 1413 |
+
"rplan_labels_present",
|
| 1414 |
+
"rplan_conversion",
|
| 1415 |
+
"rooms",
|
| 1416 |
+
"open_room_type_pairs",
|
| 1417 |
+
"wall_thickness_m",
|
| 1418 |
+
"wall_height_m",
|
| 1419 |
+
"topology_adjacencies",
|
| 1420 |
+
"doors",
|
| 1421 |
+
"wall_generation",
|
| 1422 |
+
"windows"
|
| 1423 |
+
],
|
| 1424 |
+
"expected": {
|
| 1425 |
+
"rooms_sha256": "06c6823aad8424ceab612147dfbaed9f6c90471621a89ac2b94fa14285c80e87",
|
| 1426 |
+
"plan_core_sha256": "5dd0c2cc42985b48137118c5591988c9f3cbd1fa4e707834064399c39d5d3743",
|
| 1427 |
+
"plan_sha256": "b7e934e598f9b6ff0292abee0f766cf38470c4ac4c63d06e180e2f2f9aefdaea"
|
| 1428 |
+
},
|
| 1429 |
+
"record": "28571",
|
| 1430 |
+
"dining_side": "bottom"
|
| 1431 |
+
}
|
| 1432 |
+
],
|
| 1433 |
+
"shared_input_overrides": [
|
| 1434 |
+
{
|
| 1435 |
+
"case": "scene_018",
|
| 1436 |
+
"plan_id": "rplan_graph2plan_26376",
|
| 1437 |
+
"record": "26376",
|
| 1438 |
+
"group": "B",
|
| 1439 |
+
"dining_side": "bottom",
|
| 1440 |
+
"note": "The shared scene_018 input (rooms.json, floorplan.svg/png, used by every baseline) keeps the October conversion of record 26376; RoboHome reads the re-converted library x_26376.json because the October plan was dropped for a door defect.",
|
| 1441 |
+
"expected": {
|
| 1442 |
+
"rooms_sha256": "63ebcdaf17a36a8c3c4d48ab0f9298810251b077d8fc3a9487d3c3b12a995a61"
|
| 1443 |
+
}
|
| 1444 |
+
}
|
| 1445 |
+
],
|
| 1446 |
+
"expected_inputs_sha256": {
|
| 1447 |
+
"cases20/scene_000/entities.json": "f12719254275e455f1adee1d3b98b525115f569460b7efc5eb5ff4a1768d473e",
|
| 1448 |
+
"cases20/scene_000/floorplan.svg": "4c2871016441773012996728733c6b2416ea469084d3627ce225dc138b0b9c48",
|
| 1449 |
+
"cases20/scene_000/request.txt": "2fc2a511afe2df55454e26f89cd3f34071850142ef7e566f23d593dd60726141",
|
| 1450 |
+
"cases20/scene_000/rooms.json": "1bbedf9202c61f577ef22ccf8687b3ccb16b8a1e2014e6b45f45d5b910746817",
|
| 1451 |
+
"cases20/scene_001/entities.json": "f12719254275e455f1adee1d3b98b525115f569460b7efc5eb5ff4a1768d473e",
|
| 1452 |
+
"cases20/scene_001/floorplan.svg": "0418982eb31f88d527cd9de68c54ba19f8894abea93a3ae102ecad2612bd8ec7",
|
| 1453 |
+
"cases20/scene_001/request.txt": "95c3c17f1c61edc59032873461dd2553867d7363cb669a1202a881585feefbd8",
|
| 1454 |
+
"cases20/scene_001/rooms.json": "b2b4bad0590ae33f61fa38463c88cdfebaa54f852e6866e078eb5e3fc50a0fb3",
|
| 1455 |
+
"cases20/scene_002/entities.json": "f12719254275e455f1adee1d3b98b525115f569460b7efc5eb5ff4a1768d473e",
|
| 1456 |
+
"cases20/scene_002/floorplan.svg": "0879ce0ff48259a0414daa23f9ff66fcb185a1c23d68bf09ce33b5472615bb61",
|
| 1457 |
+
"cases20/scene_002/request.txt": "b01692372576ef3422758c63aefd81c721823ec51db49894dca10b1087e132b4",
|
| 1458 |
+
"cases20/scene_002/rooms.json": "2368d96e56f81b9c8494bfb4fef536a29c168768359c72980dc297bfe5310499",
|
| 1459 |
+
"cases20/scene_003/entities.json": "f12719254275e455f1adee1d3b98b525115f569460b7efc5eb5ff4a1768d473e",
|
| 1460 |
+
"cases20/scene_003/floorplan.svg": "8e41a0b69d170613e4e1d777e41ed9945498b26120aa69a6eb8cfecef382d85e",
|
| 1461 |
+
"cases20/scene_003/request.txt": "2163f91f467090e4875b549d411af7239948c39889e97eeff27c5b96e433be35",
|
| 1462 |
+
"cases20/scene_003/rooms.json": "aa0764965ee8b9b2afca4d60bded71bb262564f41ab0743b2e154d64909135b7",
|
| 1463 |
+
"cases20/scene_004/entities.json": "f12719254275e455f1adee1d3b98b525115f569460b7efc5eb5ff4a1768d473e",
|
| 1464 |
+
"cases20/scene_004/floorplan.svg": "01990e933100c813c9431646012db285cc4f9d85ba6568106a4ec46e7d6528b8",
|
| 1465 |
+
"cases20/scene_004/request.txt": "92f06da0c945c52565004b2dadd0697132f125eeac050b984d87e672231ec925",
|
| 1466 |
+
"cases20/scene_004/rooms.json": "2ed0209a7c0ba5560be5e8fe67906a4aa278b199b4af32ba6e378f267f03e677",
|
| 1467 |
+
"cases20/scene_005/entities.json": "f12719254275e455f1adee1d3b98b525115f569460b7efc5eb5ff4a1768d473e",
|
| 1468 |
+
"cases20/scene_005/floorplan.svg": "a9412908d4dba2cdb2eb343cf87bb666d0a679e68773b550c228e0d5995c0e88",
|
| 1469 |
+
"cases20/scene_005/request.txt": "82bf1fe0c435a6ab4cb1f7f6747e73643fc05a3ed693177933844697231cdee6",
|
| 1470 |
+
"cases20/scene_005/rooms.json": "39212b009ec25adc12ee7cc415c828a2a7606d5fddf568eb57b6efb35bd6313b",
|
| 1471 |
+
"cases20/scene_006/entities.json": "f12719254275e455f1adee1d3b98b525115f569460b7efc5eb5ff4a1768d473e",
|
| 1472 |
+
"cases20/scene_006/floorplan.svg": "4e3178aa57c7dea3d264f33af3eee15d56fa80790cc80ff1cc8d4c58e2f32fd3",
|
| 1473 |
+
"cases20/scene_006/request.txt": "82bf1fe0c435a6ab4cb1f7f6747e73643fc05a3ed693177933844697231cdee6",
|
| 1474 |
+
"cases20/scene_006/rooms.json": "6fc1d03f117c7a384338ebc1e48e2c9676d8937e2f05799fac5966378bfb31a5",
|
| 1475 |
+
"cases20/scene_007/entities.json": "f12719254275e455f1adee1d3b98b525115f569460b7efc5eb5ff4a1768d473e",
|
| 1476 |
+
"cases20/scene_007/floorplan.svg": "935305e1f0076f8dfbd14cc3fcc54b4eeb7a021c46ba029a17ddbb3e62f86b47",
|
| 1477 |
+
"cases20/scene_007/request.txt": "82bf1fe0c435a6ab4cb1f7f6747e73643fc05a3ed693177933844697231cdee6",
|
| 1478 |
+
"cases20/scene_007/rooms.json": "f1dfab4b842c212d78d653836d6a9c0574d13e3604fb9ef8086ef1fc19388e83",
|
| 1479 |
+
"cases20/scene_008/entities.json": "f12719254275e455f1adee1d3b98b525115f569460b7efc5eb5ff4a1768d473e",
|
| 1480 |
+
"cases20/scene_008/floorplan.svg": "f5f66da0770283daf7283a7c616cafa0109f2e4d6699ee38efdf1aa488303079",
|
| 1481 |
+
"cases20/scene_008/request.txt": "82bf1fe0c435a6ab4cb1f7f6747e73643fc05a3ed693177933844697231cdee6",
|
| 1482 |
+
"cases20/scene_008/rooms.json": "cf2c7781ecc90ac1790a42f1f0cdd1ae549a21c8c4b4880ed739d5ae47435eb7",
|
| 1483 |
+
"cases20/scene_009/entities.json": "f12719254275e455f1adee1d3b98b525115f569460b7efc5eb5ff4a1768d473e",
|
| 1484 |
+
"cases20/scene_009/floorplan.svg": "0b357921aafc17ead25473c906947290d43d129c270555b8b176729e3685550d",
|
| 1485 |
+
"cases20/scene_009/request.txt": "82bf1fe0c435a6ab4cb1f7f6747e73643fc05a3ed693177933844697231cdee6",
|
| 1486 |
+
"cases20/scene_009/rooms.json": "508fc76ac59cf8541b240fc81c517a303c44da2601711c00cd0c922abf0305bc",
|
| 1487 |
+
"cases20/scene_010/entities.json": "f12719254275e455f1adee1d3b98b525115f569460b7efc5eb5ff4a1768d473e",
|
| 1488 |
+
"cases20/scene_010/floorplan.svg": "23f7fdfdfe179b4570084913cb9dbc2004b661f17f47a518918ba72a67d31e7a",
|
| 1489 |
+
"cases20/scene_010/request.txt": "82bf1fe0c435a6ab4cb1f7f6747e73643fc05a3ed693177933844697231cdee6",
|
| 1490 |
+
"cases20/scene_010/rooms.json": "da280fe8bbac0bc7455afd06c8c8b9214b942c50a9600e532abfc55ea6866e87",
|
| 1491 |
+
"cases20/scene_011/entities.json": "f12719254275e455f1adee1d3b98b525115f569460b7efc5eb5ff4a1768d473e",
|
| 1492 |
+
"cases20/scene_011/floorplan.svg": "b78b13b8717d7eef4bbacda00c3bb6ba37042568f99c15e6f14aee81f8456fb9",
|
| 1493 |
+
"cases20/scene_011/request.txt": "82bf1fe0c435a6ab4cb1f7f6747e73643fc05a3ed693177933844697231cdee6",
|
| 1494 |
+
"cases20/scene_011/rooms.json": "7543a1d2973ef547db66a051c34f6e1a6b9f176cc8149d1c7e38a2fa4f03af4b",
|
| 1495 |
+
"cases20/scene_012/entities.json": "f12719254275e455f1adee1d3b98b525115f569460b7efc5eb5ff4a1768d473e",
|
| 1496 |
+
"cases20/scene_012/floorplan.svg": "96dd8257f1c4643f3a83496cd0545532aacd88ecd10456cecd8325000ea9e6ef",
|
| 1497 |
+
"cases20/scene_012/request.txt": "82bf1fe0c435a6ab4cb1f7f6747e73643fc05a3ed693177933844697231cdee6",
|
| 1498 |
+
"cases20/scene_012/rooms.json": "e2a465a304e649a5a2a482ba1fa04b80a4aa7fa15ee0aa07c336c6e52ff38722",
|
| 1499 |
+
"cases20/scene_013/entities.json": "f12719254275e455f1adee1d3b98b525115f569460b7efc5eb5ff4a1768d473e",
|
| 1500 |
+
"cases20/scene_013/floorplan.svg": "36a20ca40170aa20ac75a95aafaf071a221932b0eb03ea9b377492a842bb052e",
|
| 1501 |
+
"cases20/scene_013/request.txt": "c508c1397f328ba9af29523d9c061ae1fd1385b0100b0afe7e6882ac46dd16ff",
|
| 1502 |
+
"cases20/scene_013/rooms.json": "02e71ae85bbeb70da836ac28394bf675ead74292a2971b01c8d6a6c400d53693",
|
| 1503 |
+
"cases20/scene_014/entities.json": "f12719254275e455f1adee1d3b98b525115f569460b7efc5eb5ff4a1768d473e",
|
| 1504 |
+
"cases20/scene_014/floorplan.svg": "f3efb568beefbe00fee63ebb04a1fb9f669309013fba40f24a8f61af9d5de367",
|
| 1505 |
+
"cases20/scene_014/request.txt": "95c3c17f1c61edc59032873461dd2553867d7363cb669a1202a881585feefbd8",
|
| 1506 |
+
"cases20/scene_014/rooms.json": "de9b9d56fe0a45865624bc96aae732eda556a12a4683775a7a61c59004a01f31",
|
| 1507 |
+
"cases20/scene_015/entities.json": "f12719254275e455f1adee1d3b98b525115f569460b7efc5eb5ff4a1768d473e",
|
| 1508 |
+
"cases20/scene_015/floorplan.svg": "0e225259fc27f8a0732e852e2eae84a19b7d6270cee3ff72e84e9ed6f63e8d72",
|
| 1509 |
+
"cases20/scene_015/request.txt": "82bf1fe0c435a6ab4cb1f7f6747e73643fc05a3ed693177933844697231cdee6",
|
| 1510 |
+
"cases20/scene_015/rooms.json": "7346fdd181373930491d7951ee16f10181a55b070e7a33ef00ea8dab231615e5",
|
| 1511 |
+
"cases20/scene_016/entities.json": "f12719254275e455f1adee1d3b98b525115f569460b7efc5eb5ff4a1768d473e",
|
| 1512 |
+
"cases20/scene_016/floorplan.svg": "2354e481936fadc10a0fd1c19fb538fb30f3f92466e5bdf902a1da24f2b995d3",
|
| 1513 |
+
"cases20/scene_016/request.txt": "c508c1397f328ba9af29523d9c061ae1fd1385b0100b0afe7e6882ac46dd16ff",
|
| 1514 |
+
"cases20/scene_016/rooms.json": "4398e04b86689aec0065b1f73fcbb8e9031bfc585c56e4a497e1bc7aa0c588a1",
|
| 1515 |
+
"cases20/scene_017/entities.json": "f12719254275e455f1adee1d3b98b525115f569460b7efc5eb5ff4a1768d473e",
|
| 1516 |
+
"cases20/scene_017/floorplan.svg": "5611c9e5cb94f1b12d21540c7f075b7cc4935b7f96d4ad1bda7252729746700a",
|
| 1517 |
+
"cases20/scene_017/request.txt": "82bf1fe0c435a6ab4cb1f7f6747e73643fc05a3ed693177933844697231cdee6",
|
| 1518 |
+
"cases20/scene_017/rooms.json": "74c56026ee8d4ddf8052cd645b62939757ed5227721b2269484945c63c2b6ed8",
|
| 1519 |
+
"cases20/scene_018/entities.json": "f12719254275e455f1adee1d3b98b525115f569460b7efc5eb5ff4a1768d473e",
|
| 1520 |
+
"cases20/scene_018/floorplan.svg": "e07b65fe62ff69236de0b5cb067f9a0324323a6fe203b9f2983b38cd0ad1d9be",
|
| 1521 |
+
"cases20/scene_018/request.txt": "82bf1fe0c435a6ab4cb1f7f6747e73643fc05a3ed693177933844697231cdee6",
|
| 1522 |
+
"cases20/scene_018/rooms.json": "e5dffc701661c37a0e2a300bee634ab6fef805541c752525e4d49a8f2ce67589",
|
| 1523 |
+
"cases20/scene_019/entities.json": "f12719254275e455f1adee1d3b98b525115f569460b7efc5eb5ff4a1768d473e",
|
| 1524 |
+
"cases20/scene_019/floorplan.svg": "ecc771b025a68c7cc42a9d77b9f1416a635ff075db49c119a35a5b51668befe9",
|
| 1525 |
+
"cases20/scene_019/request.txt": "82bf1fe0c435a6ab4cb1f7f6747e73643fc05a3ed693177933844697231cdee6",
|
| 1526 |
+
"cases20/scene_019/rooms.json": "eecdabaf2ffd6d5db42273783dfc2dbc279c66ad076202c43f1e693733e38220"
|
| 1527 |
+
}
|
| 1528 |
+
}
|
docs/reproduction/public_conversion_code/README.md
ADDED
|
@@ -0,0 +1,391 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# RoboHouseGen
|
| 2 |
+
|
| 3 |
+
2026-10-26: [Wholehouse V25 handoff](releases/wholehouse-v25/README.md) provides the
|
| 4 |
+
frozen seven-room generation chain, sealed example inputs, configurable runtime
|
| 5 |
+
mounts, indoor rendering and actual door dynamics behind one runnable entrypoint.
|
| 6 |
+
See its setup and verified-scope notes before running a new environment.
|
| 7 |
+
|
| 8 |
+
2026-10-21:交付烘焙增加默认 6GiB 场景贴图预算,源 PBR 与预算结果分目录保存。
|
| 9 |
+
预算包默认导出 BC7 颜色与 PNG8 非颜色通道;实际消费显存需独立验证。
|
| 10 |
+
参数和显式旧行为对照见[纹理预算策略](docs/texture-fidelity-policy.md)。
|
| 11 |
+
|
| 12 |
+
The real-asset household generator defaults to the verified joint layout/assembly chain. It requires an explicit request; [automatic request/evidence completion remains a separate integration](docs/joint-default-generation.md).
|
| 13 |
+
|
| 14 |
+
For the real-asset household scene pipeline, see [the pipeline guide](README_PIPELINE.md),
|
| 15 |
+
[automatic per-server asset setup](docs/asset-bundle-setup.md),
|
| 16 |
+
[offline prepared asset pools](docs/prepared_asset_pool.md),
|
| 17 |
+
[automatic native cabinet and drawer joints](docs/native-articulations.md),
|
| 18 |
+
[the offline upper-cabinet hinge pilot](docs/upper-cabinet-pilot-20261015.md),
|
| 19 |
+
[the reviewed static-cabinet expansion](docs/cabinet-expansion-20261016.md),
|
| 20 |
+
[the minimal cabinet repair results](docs/cabinet-minimal-repair-20261016.md),
|
| 21 |
+
[the 23-cabinet root-cause follow-up](docs/cabinet-root-cause-20261017.md),
|
| 22 |
+
[the 52-source native-cabinet acceptance](docs/native-cabinets-52-20261018.md),
|
| 23 |
+
[the GPT-6 batch articulation workflow](docs/articulation-auto.md),
|
| 24 |
+
[official MDL SDK setup and material conversion](docs/official-mdl-pipeline.md),
|
| 25 |
+
[native-size joint layout and publication rendering](docs/style_joint_generation.md), and
|
| 26 |
+
[the 2026-10-13 acceptance results](docs/prepared-pool-results-20261013.md).
|
| 27 |
+
The [2026-10-14 per-asset usability release](docs/asset-usability-20261014/README.md)
|
| 28 |
+
publishes category counts, the qualified furniture index, attribute schema and sealed
|
| 29 |
+
code/evidence receipts for 29,577 inspected records, including 5,715 usable furniture
|
| 30 |
+
and furniture-set records. This is static asset qualification, not robot physics approval.
|
| 31 |
+
The [asset expansion dashboard](docs/asset-expansion-20261022/README.md)
|
| 32 |
+
now includes 63 additional source model packages for offices, classrooms, libraries,
|
| 33 |
+
homes and lobbies, with bilingual rich descriptions, evidence-bound style labels,
|
| 34 |
+
room filters and separate glTF/USD source checks. One shelf has a recorded glTF scale
|
| 35 |
+
discrepancy and remains blocked for placement. Download and reproduction scripts are
|
| 36 |
+
in [the multi-scene supplement](scripts/asset_multiscene_20261030/README.md).
|
| 37 |
+
These candidates are not new sealed-pool admissions.
|
| 38 |
+
The [full-inventory style catalog](docs/asset-expansion-20261022/style_catalog/README.md)
|
| 39 |
+
adds evidence-bound `style` and `style_tags` metadata across registered assets,
|
| 40 |
+
archive members, materials, environment maps and new candidates. Unknown and
|
| 41 |
+
conflicting styles remain explicit. Optional `query_assets.py --style` filtering
|
| 42 |
+
uses a separate read-only index and preserves existing source and geometry checks.
|
| 43 |
+
Default generation also reuses selected, prepared native furniture joints,
|
| 44 |
+
validates their motion in the full house, and packages the resulting runtime.
|
| 45 |
+
This pipeline requires the external asset libraries and runtime paths described in its guide;
|
| 46 |
+
generated scenes, asset payloads, and prepared database files are stored separately.
|
| 47 |
+
|
| 48 |
+
Current product release: **fast**. The public benchmark/API compatibility version remains
|
| 49 |
+
`0.1.0`; `fast` names the optimized product implementation, not generated scenes. Scene and
|
| 50 |
+
case identifiers therefore use ordinary semantic names without release or host prefixes.
|
| 51 |
+
|
| 52 |
+
RoboHouseGen is an open-set humanoid benchmark generator. It retrieves and composes
|
| 53 |
+
verified task skills, asks SceneSmith for a task-compatible household scene, overlays a
|
| 54 |
+
robot embodiment, validates the result in Isaac Lab-Arena, and compiles deterministic
|
| 55 |
+
simulator-truth evaluators.
|
| 56 |
+
|
| 57 |
+
**Start here:** [`docs/INPUT_OUTPUT_CONTRACT.md`](docs/INPUT_OUTPUT_CONTRACT.md) defines the
|
| 58 |
+
complete user input, internal contracts, output directory, preview/timing artifacts, and
|
| 59 |
+
portable delivery format. New benchmark scenes are YAML/JSON configuration; they do not
|
| 60 |
+
require changes to Python source files.
|
| 61 |
+
|
| 62 |
+
## Benchmark previews
|
| 63 |
+
|
| 64 |
+
### Bedroom transfer
|
| 65 |
+
|
| 66 |
+

|
| 67 |
+
|
| 68 |
+
### Reading-room bottle disposal
|
| 69 |
+
|
| 70 |
+

|
| 71 |
+
|
| 72 |
+
The initial embodiment catalog contains Unitree G1, Fourier GR1T2, and RP1.3. Tasks are
|
| 73 |
+
robot-independent: a capability matcher decides whether an embodiment can instantiate a
|
| 74 |
+
task and records the reason when it cannot.
|
| 75 |
+
|
| 76 |
+
## Local development
|
| 77 |
+
|
| 78 |
+
```bash
|
| 79 |
+
uv sync --extra dev
|
| 80 |
+
uv run rhg doctor
|
| 81 |
+
uv run rhg catalog stats
|
| 82 |
+
uv run rhg task generate --prompt "carry a box to a table"
|
| 83 |
+
uv run uvicorn apps.api.main:app --reload
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
For a Conda-based host environment:
|
| 87 |
+
|
| 88 |
+
```bash
|
| 89 |
+
conda env create -f environment.yml
|
| 90 |
+
conda run -n robothousegen python -m pip install -e ".[dev]"
|
| 91 |
+
conda run -n robothousegen pytest -q
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
The API serves the built web catalog from `web/dist` when it exists. During frontend
|
| 95 |
+
development, run `npm install && npm run dev` in `web/`.
|
| 96 |
+
The asset contract and RoboLab scene-gen compatibility profile are available at
|
| 97 |
+
`/docs/assets` or directly in `docs/ASSET_INTERFACE.html`.
|
| 98 |
+
|
| 99 |
+
## Quality checks
|
| 100 |
+
|
| 101 |
+
```bash
|
| 102 |
+
uv run ruff check .
|
| 103 |
+
uv run ruff format --check .
|
| 104 |
+
uv run mypy apps packages
|
| 105 |
+
uv run pytest -q
|
| 106 |
+
```
|
| 107 |
+
|
| 108 |
+
GPU and Isaac tests are separate because SceneSmith, EmbodiedGen, and Isaac Sim must not
|
| 109 |
+
be installed into the core Python environment.
|
| 110 |
+
|
| 111 |
+
## Relay media and curated assets
|
| 112 |
+
|
| 113 |
+
The OpenAI-compatible relay reads credentials only from `IMAGE2_API_KEY`; see
|
| 114 |
+
`.env.example` for non-secret settings. Generate, edit, or inspect an image with
|
| 115 |
+
`uv run python scripts/relay_media.py`. `MULTIMODAL_API=auto` prefers Responses and
|
| 116 |
+
falls back to Chat Completions for relays that do not expose Responses.
|
| 117 |
+
|
| 118 |
+
The same operations are available through `rhg media` and the `/v1/generative/*` API.
|
| 119 |
+
`GET /v1/generative/status` reports configuration without returning credentials.
|
| 120 |
+
SAM 3D Objects is integrated as an isolated worker through `rhg sam3d`; run
|
| 121 |
+
`rhg sam3d doctor` before generation. The adapter requires both the SAM3 checkpoint and
|
| 122 |
+
the SAM 3D Objects `pipeline.yaml`. `SAM3D_MEMORY_STRATEGY=staged_process` runs SAM3
|
| 123 |
+
segmentation and SAM3D reconstruction in isolated processes, optionally on two GPUs, so
|
| 124 |
+
the segmentation model and CUDA context are fully released before reconstruction. This
|
| 125 |
+
reduces peak residency but does not pretend that two 24 GB cards are one 48 GB card.
|
| 126 |
+
FSDP is rejected explicitly because the upstream custom sparse inference pipeline is not
|
| 127 |
+
rank-synchronous or FSDP-safe. The staged path remains experimental until it passes a full
|
| 128 |
+
reconstruction on an idle RTX 4090.
|
| 129 |
+
`scripts/sam3d_worker.py` implements the protocol against SceneSmith and exports a validated
|
| 130 |
+
GLB plus `sam3d_manifest.json`; invoke it from the isolated SceneSmith Conda environment.
|
| 131 |
+
|
| 132 |
+
`rhg benchmark build --backend scenesmith` runs the strict end-to-end scene path. The core
|
| 133 |
+
agent compiles a `TaskSpec`, `SceneRequestCompiler` creates the RoboLab-compatible request,
|
| 134 |
+
and `scripts/scenesmith_worker.py` enriches it with the merged retrieval catalog before
|
| 135 |
+
running all SceneSmith stages. The worker exports the final Blender scene to USD and only
|
| 136 |
+
returns success when every requested task entity is bound to a generated SceneSmith object.
|
| 137 |
+
Use `scripts/run_remote_benchmark.sh` on the deployed host to load the relay credentials,
|
| 138 |
+
force strict SceneSmith mode, and enable Poly Haven preview lighting/materials.
|
| 139 |
+
Use `rhg scene doctor` to inspect the isolated runtime and `rhg scene compile-request` to
|
| 140 |
+
inspect the exact wire request without launching generation. Deployment details and failure
|
| 141 |
+
semantics are documented in `docs/SCENE_GENERATION_PIPELINE.md`.
|
| 142 |
+
|
| 143 |
+
New scenes are declarative. Use a benchmark YAML instead of adding a Python scenario:
|
| 144 |
+
|
| 145 |
+
```bash
|
| 146 |
+
RHG_TASK_AGENT=generative rhg benchmark build \
|
| 147 |
+
--spec examples/bedroom_transfer.yaml \
|
| 148 |
+
--out runs/bedroom-transfer
|
| 149 |
+
```
|
| 150 |
+
|
| 151 |
+
### Prompt-to-scene remote runner
|
| 152 |
+
|
| 153 |
+
For manual remote generation, use `scripts/prompt_to_scene.py`. It accepts one natural-language
|
| 154 |
+
request, asks the Scene Design Agent to fill the structured benchmark contract, validates the
|
| 155 |
+
result, and then invokes the existing benchmark builder. Users do not need to author separate
|
| 156 |
+
task, scene, asset, and iteration YAML files.
|
| 157 |
+
|
| 158 |
+
On 4090-5:
|
| 159 |
+
|
| 160 |
+
```bash
|
| 161 |
+
cd /data/wyc/RoboHouseGen
|
| 162 |
+
source configs/runtime/4090-5.env
|
| 163 |
+
|
| 164 |
+
# 4090-5.env provides the GPT Responses planner and the separate Image2 relay.
|
| 165 |
+
echo "$RHG_PLANNER_BASE_URL $RHG_PLANNER_MODEL $RHG_PLANNER_API"
|
| 166 |
+
|
| 167 |
+
$RHG_CORE_PYTHON scripts/prompt_to_scene.py \
|
| 168 |
+
--prompt "生成一个办公室,机器人把木桌上的纸箱双手抱起,经过门进入另一间房,放到圆桌上" \
|
| 169 |
+
--out /data/wyc/RoboHouseGenData/runs/prompt-office-box-transfer
|
| 170 |
+
```
|
| 171 |
+
|
| 172 |
+
The default is a fast single-attempt build. Use a prompt file, a full Supervisor campaign, or a
|
| 173 |
+
design-only validation as follows:
|
| 174 |
+
|
| 175 |
+
The default `--pipeline asset_first` is the real visual-scene path: it performs ACTIVE asset
|
| 176 |
+
retrieval, metric placement, Blender composition, five-view checks, and MP4 publication. The
|
| 177 |
+
legacy structured benchmark path is still available explicitly with `--pipeline benchmark`.
|
| 178 |
+
|
| 179 |
+
Prompt generation uses two Agent layers by default. The first Agent freezes the task, rooms,
|
| 180 |
+
supports and manipulated object. The second Enrichment Agent applies the room-motif priors
|
| 181 |
+
aligned from the 4090-14 main project and adds up to five realistic context objects such as a
|
| 182 |
+
bed/nightstand/lamp grouping, sofa/side-table grouping, armchair and potted plant. Directional
|
| 183 |
+
storage enrichment remains disabled until the certified-front index has broader coverage.
|
| 184 |
+
It cannot modify task entities or architecture, and enriched furniture must still pass ACTIVE
|
| 185 |
+
asset retrieval, front certification, collision, route and Prompt-fidelity gates. At least one
|
| 186 |
+
plant and one practical lamp are required unless the Prompt explicitly forbids them.
|
| 187 |
+
|
| 188 |
+
Use `--no-enrichment` for sparse task-only scenes, `--context-object-limit 2..6` to control
|
| 189 |
+
density, or `--enrichment-attempts N` to change the correction budget. Each run records the
|
| 190 |
+
second Agent under `inputs/generated_enrichment.json` and in
|
| 191 |
+
`prompt_to_scene_manifest.json.enrichment_audit`.
|
| 192 |
+
|
| 193 |
+
```bash
|
| 194 |
+
$RHG_CORE_PYTHON scripts/prompt_to_scene.py \
|
| 195 |
+
--prompt-file request.txt \
|
| 196 |
+
--out /data/wyc/RoboHouseGenData/runs/prompt-case \
|
| 197 |
+
--no-single-attempt \
|
| 198 |
+
--max-total-attempts 10 \
|
| 199 |
+
--time-budget 7200
|
| 200 |
+
|
| 201 |
+
$RHG_CORE_PYTHON scripts/prompt_to_scene.py \
|
| 202 |
+
--prompt "生成一个带门的双房间箱子搬运任务" \
|
| 203 |
+
--out /data/wyc/RoboHouseGenData/runs/design-only \
|
| 204 |
+
--dry-run
|
| 205 |
+
|
| 206 |
+
# Legacy lightweight benchmark manifest only (no asset-first Blender render):
|
| 207 |
+
$RHG_CORE_PYTHON scripts/prompt_to_scene.py \
|
| 208 |
+
--pipeline benchmark \
|
| 209 |
+
--prompt "生成一个办公室并把箱子从木桌搬到圆桌" \
|
| 210 |
+
--out /data/wyc/RoboHouseGenData/runs/legacy-case
|
| 211 |
+
```
|
| 212 |
+
|
| 213 |
+
Useful controls include `--backend`, `--generation-profile`, `--orchestration-mode`,
|
| 214 |
+
`--max-parallel-attempts`, `--critic-min-score`, `--design-attempts`, `--design-timeout`,
|
| 215 |
+
`--planner-base-url`, `--planner-model`, `--planner-api-key-file`, and
|
| 216 |
+
`--skip-model-check`. `--overwrite` is enabled by default, so an existing exact `--out`
|
| 217 |
+
directory is replaced immediately before the build starts; use `--no-overwrite` to preserve
|
| 218 |
+
the previous refusal behavior. Project, data-root, runs-root, filesystem-root, and symlink
|
| 219 |
+
targets are always rejected by the safety guard. The generated
|
| 220 |
+
structured inputs and planner audit are stored at `inputs/generated_case.yaml`,
|
| 221 |
+
`inputs/generated_case.json`, and `prompt_to_scene_manifest.json`.
|
| 222 |
+
|
| 223 |
+
When the Agent declares two or more required rooms, the asset-first path promotes the
|
| 224 |
+
validated furniture placement to Metric V3. The run then contains
|
| 225 |
+
`metric_layout_spec_v3.json` with explicit `rooms[]`, `portals[]`, room ownership and the
|
| 226 |
+
cross-room route, plus `multi_room_validation.json` and `prompt_fidelity_report.json`.
|
| 227 |
+
Interior doors are structural portal geometry; they never enter furniture retrieval and
|
| 228 |
+
cannot replace a source support that happens to share the `CONTEXT` role.
|
| 229 |
+
|
| 230 |
+
Without an explicit `--seed`, each invocation draws a new system-random 32-bit seed. That
|
| 231 |
+
seed controls the room split axis, furniture placement preference, full asset-candidate
|
| 232 |
+
rotation, material palette, lighting preset and camera side, so repeated runs of the same
|
| 233 |
+
Prompt are diverse by default. Pass `--seed N` for exact reproduction, or use
|
| 234 |
+
`--seed-mode prompt` to derive a stable seed from the Prompt as in older releases.
|
| 235 |
+
Explicit material and shape words such as `wood`, `cardboard`, and `round` are hard retrieval
|
| 236 |
+
constraints. Verified canonical USD assets can be imported directly alongside GLB/GLTF;
|
| 237 |
+
post-import dimensions, footprints and yaw must still pass the same geometry checks.
|
| 238 |
+
|
| 239 |
+
Every successful asset-first output also contains `reports/`. The `layout/` subdirectory
|
| 240 |
+
holds the Metric V3 2D layout, the actual rendered orthographic top view, and the
|
| 241 |
+
asset-placement blueprint. `asset_dashboard.html` is self-contained and reports assets used
|
| 242 |
+
by the scene, ACTIVE inventory by source library and category, average geometry/material/
|
| 243 |
+
realism quality, A-D quality distribution, formats, licenses, and Isaac-ready coverage. The
|
| 244 |
+
same machine-readable data is stored in `asset_inventory.json`; `report_manifest.json`
|
| 245 |
+
records hashes for every report artifact.
|
| 246 |
+
|
| 247 |
+
Each successful run writes `randomization_manifest.json` with its effective seed, seed
|
| 248 |
+
source, selected assets, entity poses, split axis, materials, lighting, cameras, final-frame
|
| 249 |
+
hashes and a complete scene fingerprint. Verify repeated-run diversity with:
|
| 250 |
+
|
| 251 |
+
```bash
|
| 252 |
+
$RHG_CORE_PYTHON scripts/compare_scene_diversity.py \
|
| 253 |
+
/data/wyc/RoboHouseGenData/runs/repeat-a \
|
| 254 |
+
/data/wyc/RoboHouseGenData/runs/repeat-b \
|
| 255 |
+
--output /data/wyc/RoboHouseGenData/runs/repeat-diversity.json
|
| 256 |
+
```
|
| 257 |
+
|
| 258 |
+
The comparison requires unique seeds/fingerprints, different final frames, and differences
|
| 259 |
+
in at least two of asset selection, layout/poses, materials/lighting, and cameras.
|
| 260 |
+
|
| 261 |
+
The runtime keeps two independent API identities: `IMAGE2_*` uses `gpt-image-2` for image
|
| 262 |
+
generation, while `OPENAI_*`/`RHG_PLANNER_*` uses `gpt-6-astra` over the Responses wire API with
|
| 263 |
+
`xhigh` reasoning and response storage disabled. Use `--skip-model-check` only when a custom
|
| 264 |
+
planner endpoint intentionally omits `/models`.
|
| 265 |
+
|
| 266 |
+
Full option and contract details are in [`docs/PROMPT_TO_SCENE.md`](docs/PROMPT_TO_SCENE.md).
|
| 267 |
+
|
| 268 |
+
Build a multi-episode suite with one shared scene in the same way:
|
| 269 |
+
|
| 270 |
+
```bash
|
| 271 |
+
rhg benchmark build-suite \
|
| 272 |
+
--spec examples/all_tasks_shared_scene_v1.yaml \
|
| 273 |
+
--out runs/all-tasks-shared-scene
|
| 274 |
+
```
|
| 275 |
+
|
| 276 |
+
Validate all YAML/JSON references, task templates, factors, entity IDs, asset locks and
|
| 277 |
+
domain-randomization operations without starting a GPU backend:
|
| 278 |
+
|
| 279 |
+
```bash
|
| 280 |
+
rhg benchmark validate-suite --spec examples/all_tasks_shared_scene_v1.yaml
|
| 281 |
+
```
|
| 282 |
+
|
| 283 |
+
The suite YAML owns the scene, matrix, robot, evaluator, runtime, output policy, and asset
|
| 284 |
+
lock. Its external task library owns entities, skills, stages, predicates, factor bindings,
|
| 285 |
+
and per-condition overlays. Adding a scene or task must not add a Python branch. Python is
|
| 286 |
+
only required for a genuinely new backend, controller primitive, asset decoder, or physical
|
| 287 |
+
predicate implementation.
|
| 288 |
+
|
| 289 |
+
Natural-language aliases and task compilation profiles live in
|
| 290 |
+
`configs/task_agent/compiler_v1.yaml`. Per-episode domain-randomization operations live in
|
| 291 |
+
`configs/scene_generation/domain_randomization_v1.yaml`; the builder validates them before
|
| 292 |
+
scene generation and authors them into the stronger `layers/episode_overrides.usda` layer.
|
| 293 |
+
Every suite freezes the effective policy under `inputs/`, so the generated benchmark remains
|
| 294 |
+
auditable and portable.
|
| 295 |
+
|
| 296 |
+
Before SceneSmith starts, the worker compiles task predicates and declarative context assets
|
| 297 |
+
into `scene_dependency_graph.json`. Independent dependency subtrees retain ownership through
|
| 298 |
+
asset generation, manipulation placement, local critique, and physics checks; topology waves
|
| 299 |
+
prevent a child from running before its supports exist. Defaults live in
|
| 300 |
+
`configs/scene_generation/dependency_graph_v1.yaml`, while benchmark-specific dependency and
|
| 301 |
+
scheduler overrides live in context/asset-lock JSON. No room-specific Python branch is needed.
|
| 302 |
+
|
| 303 |
+
`rhg schema export --out schemas` exports `BenchmarkSuiteBuildRequest.schema.json` alongside
|
| 304 |
+
the runtime contracts. Unknown `scene`, `runtime`, and `output` keys are rejected before any
|
| 305 |
+
run directory or SceneSmith process is created; evaluator-specific thresholds remain an
|
| 306 |
+
explicitly extensible policy map.
|
| 307 |
+
|
| 308 |
+
Room vocabulary, source priorities, and visual quality rules are configured in
|
| 309 |
+
`configs/generation_policy.yaml`. New assets are `AssetCatalog` JSON records and can be merged
|
| 310 |
+
with `scripts/merge_asset_catalogs.py`; neither operation requires a Python import or branch.
|
| 311 |
+
|
| 312 |
+
Download the CC0 visual catalog with
|
| 313 |
+
`uv run python scripts/download_polyhaven_assets.py --root /path/to/data/assets`.
|
| 314 |
+
The resulting `catalog.json` can be passed to both isolated upstream adapters. New assets
|
| 315 |
+
remain Tier B and cannot be used for formal scoring until Isaac scale, collision, mass,
|
| 316 |
+
and articulation QA promotes them. `scripts/convert_asset.py` converts common mesh
|
| 317 |
+
formats to USD, and `scripts/render_scene_preview.py` creates an orbit MP4.
|
| 318 |
+
|
| 319 |
+
## High-fidelity asset preprocessing
|
| 320 |
+
|
| 321 |
+
`scripts/preprocess_high_fidelity_assets.py` converts the complete managed GSO and
|
| 322 |
+
PolyHaven source packages into a separate canonical USD library. It never modifies the
|
| 323 |
+
immutable `assets/raw` or `assets/staged` packages. The canonical copies use Z-up metres,
|
| 324 |
+
have explicit `UsdPhysics.CollisionAPI` on each mesh, retain PBR texture packages, and are
|
| 325 |
+
validated through the USD runtime before descriptor release.
|
| 326 |
+
|
| 327 |
+
The release adds searchable rich tags for source/category/subcategory, PBR channels,
|
| 328 |
+
quality scores, width/depth/height, footprint, size class, support type, collision type,
|
| 329 |
+
articulation, canonical coordinate frame, and functional-front confidence. Only assets that
|
| 330 |
+
pass the full geometry, dependency, collision, dimensions, orientation and multiview checks
|
| 331 |
+
become `ACTIVE`; failures stay in the versioned plan with an explicit reason.
|
| 332 |
+
|
| 333 |
+
Each `rich_retrieval_documents.json` entry also contains an `orientation` contract. It states
|
| 334 |
+
the canonical `+Z`/`-Z` frame, certified functional front, back/right/left axes when known,
|
| 335 |
+
confidence/evidence provenance, symmetry, and a placement policy. Asset selection may use
|
| 336 |
+
`directional_placement_allowed` for chairs, storage, beds, and displays only when the
|
| 337 |
+
functional front is certified. `directional_placement_blocked` is fail-closed: the asset may
|
| 338 |
+
remain searchable but cannot be requested to face a target or wall. Direction-neutral assets
|
| 339 |
+
use either `rotationally_symmetric_no_front_required` or `visual_orientation_optional`; their
|
| 340 |
+
geometric yaw is not reported as a verified semantic direction. All placement rejects roll,
|
| 341 |
+
pitch, and inversion, preserving canonical Z-up.
|
| 342 |
+
|
| 343 |
+
To enrich an already released index without reconverting or moving any asset files, derive a
|
| 344 |
+
new immutable index and source its activation file:
|
| 345 |
+
|
| 346 |
+
```bash
|
| 347 |
+
$RHG_CORE_PYTHON scripts/enrich_asset_orientation_index.py \
|
| 348 |
+
--input-index "$RHG_ASSET_INDEX" \
|
| 349 |
+
--output "$RHG_ASSETS_ROOT/high_quality/h20-aligned/index-v12-rich-orientation-4090-5-20260901"
|
| 350 |
+
source "$RHG_ASSETS_ROOT/high_quality/h20-aligned/index-v12-rich-orientation-4090-5-20260901/activate_runtime.env"
|
| 351 |
+
```
|
| 352 |
+
|
| 353 |
+
This only rewrites index metadata in the new output directory. It preserves the input index,
|
| 354 |
+
asset paths, hashes, and ACTIVE/QUARANTINED status unchanged.
|
| 355 |
+
|
| 356 |
+
On 4090-5, the full run is resumable. Re-running the same command reuses completed canonical
|
| 357 |
+
assets and continues failed or pending work:
|
| 358 |
+
|
| 359 |
+
```bash
|
| 360 |
+
cd /data/wyc/RoboHouseGen
|
| 361 |
+
source configs/runtime/4090-5.env
|
| 362 |
+
|
| 363 |
+
$RHG_CORE_PYTHON scripts/preprocess_high_fidelity_assets.py \
|
| 364 |
+
--asset-root "$RHG_ASSETS_ROOT" \
|
| 365 |
+
--output "$RHG_ASSETS_ROOT/certified/high_fidelity_complete_20260901" \
|
| 366 |
+
--base-index "$RHG_ASSET_INDEX" \
|
| 367 |
+
--stage all \
|
| 368 |
+
--include-base-active \
|
| 369 |
+
--blender "$BLENDER" \
|
| 370 |
+
--usd-python "$RHG_USD_PYTHON" \
|
| 371 |
+
--blender-batch-size 24 \
|
| 372 |
+
--usd-batch-size 128 \
|
| 373 |
+
--release-workers 8
|
| 374 |
+
```
|
| 375 |
+
|
| 376 |
+
Use `--stage discover`, `--stage convert`, or `--stage release` to run a single phase. Use
|
| 377 |
+
`--sources gso`, `--sources polyhaven`, and `--limit N` for a bounded smoke run. Do not pass
|
| 378 |
+
`--allow-partial-release` for a production index: it exists only for diagnosing a subset.
|
| 379 |
+
|
| 380 |
+
The complete run writes `preprocess_plan.json`, `prepared_catalog.json`, conversion jobs,
|
| 381 |
+
`descriptor_release/`, `active_index/asset_descriptor_index.sqlite3`, and
|
| 382 |
+
`active_index/rich_retrieval_documents.json` below the chosen output directory. The generated
|
| 383 |
+
ACTIVE index is a new version; it does not overwrite the previous directional index.
|
| 384 |
+
After a complete release, `<output>/activate_runtime.env` is written. Source this file after
|
| 385 |
+
`configs/runtime/4090-5.env` to opt into the newly promoted high-fidelity index.
|
| 386 |
+
|
| 387 |
+
Robot-aware asset-first task generation is enabled by default. Select Luna, G1 or
|
| 388 |
+
RP1; omit the choice for their strict common constraints. The web form, API and
|
| 389 |
+
CLI expose the selection and adaptation summary. See the
|
| 390 |
+
[robot task constraints guide](docs/robot-task-constraints.md) for geometry-only
|
| 391 |
+
complete generation, explicit legacy controls and independent verification.
|
docs/reproduction/public_conversion_code/configs/assets/front_axis_overrides_v1.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema_version": "1.0",
|
| 3 |
+
"description": "Hash-bound semantic-front certifications from material-aware cardinal-view inspection. These change metadata only; source geometry and canonical transforms remain immutable.",
|
| 4 |
+
"overrides": [
|
| 5 |
+
{
|
| 6 |
+
"asset_id": "hssd:objects/8/8a6d4da5fe54288ffdebffb09bce0005cbc2c0eb",
|
| 7 |
+
"asset_sha256": "ffd3bf8afffd587171c2134f7aa5228df4a230d796a2dd94fc58358bbc216f8e",
|
| 8 |
+
"front_axis": "-Y",
|
| 9 |
+
"source": "multiview_verified",
|
| 10 |
+
"confidence": 0.99,
|
| 11 |
+
"evidence": [
|
| 12 |
+
"/data/wqz/robothousegen-wyc-runs/asset-first-mediterranean-lounge-front-aware-20260827-001/front_direction_diagnostic/lounge_chair_a__certified_front.png",
|
| 13 |
+
"/data/wqz/robothousegen-wyc-runs/asset-first-mediterranean-lounge-front-aware-20260827-001/front_direction_diagnostic/lounge_chair_a__certified_back.png"
|
| 14 |
+
],
|
| 15 |
+
"note": "The seat opening and usable sitting direction are visible from canonical -Y; canonical +Y shows the solid rear shell."
|
| 16 |
+
},
|
| 17 |
+
{
|
| 18 |
+
"asset_id": "hssd:objects/6/650eafedcc551cb48130abb49b7343157db87f87",
|
| 19 |
+
"asset_sha256": "0130b8127e3da58dfda8acd36fa2cf66cfd0f2e6e5db68a14482cc74ddf375e1",
|
| 20 |
+
"front_axis": "-Y",
|
| 21 |
+
"source": "multiview_verified",
|
| 22 |
+
"confidence": 0.99,
|
| 23 |
+
"evidence": [
|
| 24 |
+
"/data/wqz/robothousegen-wyc-runs/asset-first-mediterranean-lounge-front-aware-20260827-001/front_direction_diagnostic/lounge_chair_b__certified_front.png",
|
| 25 |
+
"/data/wqz/robothousegen-wyc-runs/asset-first-mediterranean-lounge-front-aware-20260827-001/front_direction_diagnostic/lounge_chair_b__certified_back.png"
|
| 26 |
+
],
|
| 27 |
+
"note": "The seat opening and usable sitting direction are visible from canonical -Y; canonical +Y shows the solid rear shell."
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"asset_id": "hssd:objects/f/ffdeb9fd68534d011e087672596421f9d00dada0",
|
| 31 |
+
"asset_sha256": "c7868bc8f12dac5f2eccad3326f21b137901489d3e8918976e6d04d6a5d26b7d",
|
| 32 |
+
"front_axis": "-Y",
|
| 33 |
+
"source": "multiview_verified",
|
| 34 |
+
"confidence": 0.99,
|
| 35 |
+
"evidence": [
|
| 36 |
+
"/data/wqz/robothousegen-wyc-runs/asset-first-mediterranean-lounge-front-aware-20260827-001/front_direction_diagnostic/floor_speaker__certified_front.png",
|
| 37 |
+
"/data/wqz/robothousegen-wyc-runs/asset-first-mediterranean-lounge-front-aware-20260827-001/front_direction_diagnostic/floor_speaker__certified_back.png"
|
| 38 |
+
],
|
| 39 |
+
"note": "The acoustic grille is visible from canonical -Y; canonical +Y shows the plain rear cabinet panel."
|
| 40 |
+
}
|
| 41 |
+
]
|
| 42 |
+
}
|
docs/reproduction/public_conversion_code/docs/asset-bundle-setup.md
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 自动适配的资产配套
|
| 2 |
+
|
| 3 |
+
默认场景入口使用 `configs/asset_bundle.release.json` 固定资产配套版本。
|
| 4 |
+
代码按清单哈希识别配套,不用服务器名称或目录存在与否推断兼容性。
|
| 5 |
+
当前配套是 `rhg_asset_bundle_20261013_v2`:31 类角色、3,556 个合格候选版本,
|
| 6 |
+
15,859 个载荷文件,约 11.94 GB;压缩传输约 6.58 GB。
|
| 7 |
+
|
| 8 |
+
## 已配置的服务器
|
| 9 |
+
|
| 10 |
+
下载代码后直接运行:
|
| 11 |
+
|
| 12 |
+
```bash
|
| 13 |
+
python3 scripts/query_assets.py --stats
|
| 14 |
+
python3 scripts/run_generate_scene.py
|
| 15 |
+
```
|
| 16 |
+
|
| 17 |
+
入口读取个人配置 `~/.config/rhg/asset_bundle.json`,没有个人配置时读取
|
| 18 |
+
`/etc/rhg/asset_bundle.json`。配置记录该服务器实际可读的 NAS 或镜像位置。
|
| 19 |
+
Python、Blender、标注索引、离线池和户型输入从固定清单解析;新场景的输出、
|
| 20 |
+
缓存、使用历史及临时文件放在当前账号可写的位置。
|
| 21 |
+
|
| 22 |
+
机器安装和验收状态见 [服务器部署记录](asset-bundle-servers-20261013.md)。
|
| 23 |
+
个人可用 `RHG_BUNDLE_REGISTRATION` 指定另一份安装配置。
|
| 24 |
+
|
| 25 |
+
## 配置新机器
|
| 26 |
+
|
| 27 |
+
已有同版本共享配套时:
|
| 28 |
+
|
| 29 |
+
```bash
|
| 30 |
+
python3 scripts/setup_asset_bundle.py --nas-root /path/to/NAS-H-Share \
|
| 31 |
+
--state-root /path/to/writable/local/state --install-system-deps
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
没有共享存储时,使用有权限的远端源直接传输:
|
| 35 |
+
|
| 36 |
+
```bash
|
| 37 |
+
python3 scripts/setup_asset_bundle.py --sync \
|
| 38 |
+
--source USER@HOST --ssh-command 'ssh -p PORT -i KEY -o BatchMode=yes' \
|
| 39 |
+
--destination /path/to/local/bundles/rhg_asset_bundle_20261013_v2 \
|
| 40 |
+
--state-root /path/to/writable/local/state --install-system-deps
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
源需提供该配套的 `download.json` 和 `payload.tar.gz`。部署中的 SSH 账号被限制为
|
| 44 |
+
只读此版本的分发目录;不在 GitHub 分发私钥或资产访问凭据。
|
| 45 |
+
普通 SSH 源可用 `--source-path` 指定远端配套目录。默认传输限制为 16 MiB/s,
|
| 46 |
+
可用 `--bandwidth-kib` 调整。未完成的传输保留,重新执行可续传。
|
| 47 |
+
|
| 48 |
+
安装校验代码锁定的下载回执、压缩包以及每一个解包文件,再恢复相对链接。
|
| 49 |
+
共享镜像的其他消费者复用该安装校验记录;每次生成仍校验池身份和选中来源的依赖。
|
| 50 |
+
出现哈希变化会停止,不会改用同名旧库或临时挑选未经准备的资产。
|
| 51 |
+
|
| 52 |
+
## 主机运行时
|
| 53 |
+
|
| 54 |
+
支持 Linux x86-64。配套包含已验证的 Python、Pillow、Blender、BasisU 和必要 MDL
|
| 55 |
+
文件;显卡驱动属于主机环境。`--install-system-deps` 只安装识别到的缺失系统库,
|
| 56 |
+
当前支持 `libxkbcommon0`、`libxfixes3`,不会升级驱动。
|
| 57 |
+
|
| 58 |
+
网络存储上的 Blender 启动超时时,安装器会将同哈希的运行时复制到本机缓存。
|
| 59 |
+
也可主动指定 `--runtime-cache /path/to/local/runtime`。复制按固定清单校验,不改
|
| 60 |
+
Blender 版本、资产导入规则或验收阈值。
|
| 61 |
+
|
| 62 |
+
原资产记录中的路径通过进程自己的只读挂载空间提供。需要路径别名的账号需有
|
| 63 |
+
`sudo -n unshare` 权限;已有全部匹配原路径的主机可直接执行。原系统挂载和其他任务
|
| 64 |
+
不被覆盖。不要只手工改 SQLite 内的路径,这会破坏已封存的来源和材料身份。
|
| 65 |
+
|
| 66 |
+
## 范围与版本
|
| 67 |
+
|
| 68 |
+
这是合格家庭场景生成的运行配套,包含候选来源、结构材质、HDRI、索引和运行时,
|
| 69 |
+
不是整个历史资产库的完整归档。未合格候选、隔离项及元数据待补状态保持原记录;
|
| 70 |
+
完整离线诊断历史仍在源存储。新增角色或更换导入实现需离线生成新的封存版本。
|
| 71 |
+
|
| 72 |
+
生产默认户型为仓库内 `configs/floorplans/rplan_production_25.json` 的全部 25 个户型,
|
| 73 |
+
随代码发布;资产配套中冻结的旧户型输入不再覆盖这个默认值。
|
| 74 |
+
`qualified_random` 从这 25 个户型中选择,显式 `--rplan-seeds` 仍可指定其他输入。
|
| 75 |
+
此前电视越界的失败和旧户型验收结果保留;设为生产输入不代表 25 个户型的每个
|
| 76 |
+
资产组合都已通过完整生成。资产配套和机器人完整物理任务的验收分开记录。
|
| 77 |
+
|
| 78 |
+
旧任务继续使用其保存的配置。显式配置 `"asset_bundle": null` 可停用自动适配,
|
| 79 |
+
此时必须提供完整的原有路径设置。不要将新安装配置覆盖到历史场景的冻结配置中。
|
| 80 |
+
|
| 81 |
+
本次切换已核对 25 个唯一户型、25 个均无拓扑硬拒绝,固定种子的 25 次选择覆盖全部户型。
|
| 82 |
+
4090-13 使用新默认输入完成一轮完整场景生成(组装、保存读回、GPU 渲染、打包),
|
| 83 |
+
退出码 0,耗时 292.88 秒;这不等同于 25 轮完整生成。
|
| 84 |
+
详见 [生产户型切换回执](evidence/production-floorplans-25-20261013.json)。
|
docs/reproduction/public_conversion_code/docs/official-mdl-pipeline.md
ADDED
|
@@ -0,0 +1,270 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Official MDL material pipeline
|
| 2 |
+
|
| 3 |
+
When Blender leaves an authored USD MDL material unconnected, the pipeline uses
|
| 4 |
+
NVIDIA MDL SDK to load the module, construct its typed call graph, compile it,
|
| 5 |
+
distill it to `transmissive_pbr`, and bake channels before building Blender
|
| 6 |
+
nodes **during offline asset preparation**. Connected native material graphs remain unchanged. Missing inputs or
|
| 7 |
+
resources produce explicit failures; there is no gray fallback or substituted
|
| 8 |
+
material.
|
| 9 |
+
|
| 10 |
+
## Remote setup
|
| 11 |
+
|
| 12 |
+
The pinned worker currently targets Linux x86-64 and the official CPython 3.10
|
| 13 |
+
binding. Install on the rendering server; the archive is about 315 MB.
|
| 14 |
+
|
| 15 |
+
```bash
|
| 16 |
+
python scripts/setup_mdl_sdk.py \
|
| 17 |
+
--install-root /remote/tools/mdl-sdk/2026.0.2 \
|
| 18 |
+
--worker-python /remote/python310/bin/python
|
| 19 |
+
```
|
| 20 |
+
|
| 21 |
+
The installer verifies the official archive SHA256 and prints configuration
|
| 22 |
+
fields. Add those fields to the offline preparation configuration. The scene
|
| 23 |
+
configuration retains the producer identity for verification, but the whole-house
|
| 24 |
+
process cannot compile or bake MDL:
|
| 25 |
+
|
| 26 |
+
```bash
|
| 27 |
+
python scripts/prepare_asset_pool.py worker --pool /remote/new-pool \
|
| 28 |
+
--lookup /remote/annotation-lookup.sqlite3
|
| 29 |
+
|
| 30 |
+
python scripts/validate_material_assets.py init \
|
| 31 |
+
--pool /remote/new-pool --out /remote/material-validation
|
| 32 |
+
python scripts/validate_material_assets.py worker \
|
| 33 |
+
--out /remote/material-validation --gpu 0
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
The default bake resolution is 1024. `mdl_search_paths` must contain the actual
|
| 37 |
+
source module packages and their dependencies. Module filenames and loaded SDK
|
| 38 |
+
module identities must agree. Authored texture filenames are imported through
|
| 39 |
+
the SDK image database; they are not confused with absolute MDL resource names.
|
| 40 |
+
An authored color-space declaration takes priority; otherwise the SDK's typed
|
| 41 |
+
parameter default supplies texture gamma.
|
| 42 |
+
|
| 43 |
+
`mdl_backend: legacy` is an explicit compatibility control. It preserves the
|
| 44 |
+
former limited translator for frozen comparisons and is never an automatic
|
| 45 |
+
fallback after an SDK error. This control also prepares its material libraries
|
| 46 |
+
offline.
|
| 47 |
+
|
| 48 |
+
The worker writes packed `.blend` material libraries and immutable manifests.
|
| 49 |
+
Each manifest binds source/runtime hashes, the canonical matrix, Blender
|
| 50 |
+
version, source mesh topology, UVs, polygon material indices, ordered material
|
| 51 |
+
slots, normalized node graphs and decoded image pixels. It reloads the saved
|
| 52 |
+
library before accepting serialization. Native graphs are preserved.
|
| 53 |
+
|
| 54 |
+
Run independent image review on the four views of each material-validation case.
|
| 55 |
+
Save a `results/<case>/appearance_review.json` with `passed: true` only after
|
| 56 |
+
acceptance and `render_sha256` equal to that case's `render.json` SHA256; include
|
| 57 |
+
the reviewer, method, criteria and findings. A readability review does not certify
|
| 58 |
+
lossless MDL equivalence. Failed and pending reviews remain outside the sealed
|
| 59 |
+
pool. Then seal the evidence and pool:
|
| 60 |
+
|
| 61 |
+
```bash
|
| 62 |
+
python scripts/seal_material_acceptance.py --bench /remote/material-validation \
|
| 63 |
+
--out /remote/material-acceptance
|
| 64 |
+
python scripts/prepare_asset_pool.py finalize --pool /remote/new-pool \
|
| 65 |
+
--material-artifact-index /remote/material-acceptance/index.json
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
An explicit `--allow-visual-adjudications` option can include separately recorded
|
| 69 |
+
`visual_adjudication.json` decisions. Such a decision must name the reviewer and
|
| 70 |
+
reason and bind the original rejected review, current render report and reviewed
|
| 71 |
+
image sheet by SHA256. The automated rejection remains in the evidence and the
|
| 72 |
+
summary reports adjudicated acceptances separately.
|
| 73 |
+
|
| 74 |
+
For assets already prepared and reviewed independently, pass that same index to
|
| 75 |
+
`prepare_asset_pool.py worker --material-artifact-index ...` to reuse the exact
|
| 76 |
+
library. Whole-house execution always forces `scene_load_only`, verifies the
|
| 77 |
+
manifest, library, acceptance evidence and source identity, and binds the saved
|
| 78 |
+
materials to their original slots. Missing results fail explicitly. The assembly
|
| 79 |
+
audit records zero MDL compile requests and library graph/pixel checks; subsequent
|
| 80 |
+
save/reopen/render checks test integration, not asset material acceptance.
|
| 81 |
+
|
| 82 |
+
## Separate gates
|
| 83 |
+
|
| 84 |
+
1. **Compile:** module and typed parameter resolution, source/runtime identity,
|
| 85 |
+
connected calls, dependency and active-resource hashes.
|
| 86 |
+
2. **Distill and bake:** target name, SDK version/binaries, worker code,
|
| 87 |
+
constant/texture results, linear EXR hashes, UV range and state dependencies.
|
| 88 |
+
3. **Bind:** exact USD mesh/material bindings, preservation of native graphs,
|
| 89 |
+
Blender node reconstruction and unchanged source geometry.
|
| 90 |
+
4. **Appearance:** independent review of actual images. Successful compilation,
|
| 91 |
+
a connected graph, or a nonblank image does not pass this gate automatically.
|
| 92 |
+
|
| 93 |
+
Distillation is an approximation. Principled reflection/transmission tint and
|
| 94 |
+
thin-wall differences are recorded; they are not called lossless. Source volume
|
| 95 |
+
absorption/scattering coefficients are baked directly and mapped to volume
|
| 96 |
+
nodes. Nonzero displacement requires explicit geometry preparation. Unsupported
|
| 97 |
+
state dependencies, scene data, animation and UDIM contracts remain failures
|
| 98 |
+
instead of silently becoming constants.
|
| 99 |
+
|
| 100 |
+
## Prepared pools and shared attributes
|
| 101 |
+
|
| 102 |
+
Create a new prepared-pool directory and cache when the runtime or material
|
| 103 |
+
pipeline changes. SDK code, binaries, bake resolution and search paths are part
|
| 104 |
+
of translated-material preparation identity. Old translated probes do not
|
| 105 |
+
become SDK-qualified by changing a path or copying a success flag. Native graph
|
| 106 |
+
preparation retains its separate identity.
|
| 107 |
+
|
| 108 |
+
```bash
|
| 109 |
+
python scripts/prepare_asset_pool.py init --pool /remote/new-pool \
|
| 110 |
+
--catalog /remote/frozen-catalog.sqlite3 --config /remote/runtime.json
|
| 111 |
+
python scripts/prepare_asset_pool.py worker --pool /remote/new-pool \
|
| 112 |
+
--lookup /remote/annotation-index.sqlite3
|
| 113 |
+
# After independent asset validation and sealing described above:
|
| 114 |
+
python scripts/prepare_asset_pool.py finalize --pool /remote/new-pool \
|
| 115 |
+
--material-artifact-index /remote/material-acceptance/index.json
|
| 116 |
+
```
|
| 117 |
+
|
| 118 |
+
Repaired source variants keep their own runtime hashes and derivation records.
|
| 119 |
+
Shared style evidence must match the selected source, canonical frame and
|
| 120 |
+
material pipeline. The consumer does not edit the shared attribute release.
|
| 121 |
+
|
| 122 |
+
To prepare a released repair manifest, add
|
| 123 |
+
`--runtime-release-manifest /remote/release/available_models.jsonl` to the pool
|
| 124 |
+
`init` command. This freezes the release, original source, derived runtime and
|
| 125 |
+
repair-provenance hashes. Changed bytes receive a distinct candidate key and
|
| 126 |
+
fresh geometry, material and support measurements. The release's historical
|
| 127 |
+
`source_runtime_eligibility` flag is recorded as context; the new preparation
|
| 128 |
+
results determine qualification. An absent or ambiguous release match remains
|
| 129 |
+
an explicit failed candidate. The original source file stays unchanged.
|
| 130 |
+
|
| 131 |
+
Material substitutions are rejected unless `--allow-material-substitutes` is
|
| 132 |
+
explicitly passed. That flag admits a labelled variant for testing; it does not
|
| 133 |
+
certify recovery of the original material. Old shared appearance records cannot
|
| 134 |
+
qualify a changed runtime identity.
|
| 135 |
+
|
| 136 |
+
Changed runtimes also require an independent source/runtime pair check:
|
| 137 |
+
|
| 138 |
+
```bash
|
| 139 |
+
python scripts/qualify_runtime_release.py init --pool /remote/new-pool --out /remote/pairs
|
| 140 |
+
python scripts/qualify_runtime_release.py worker --pool /remote/new-pool --out /remote/pairs \
|
| 141 |
+
--material-artifact-index /remote/material-acceptance/index.json
|
| 142 |
+
python scripts/prepare_asset_pool.py worker --pool /remote/new-pool \
|
| 143 |
+
--lookup /remote/annotation-lookup.sqlite3 --runtime-material-pairs /remote/pairs
|
| 144 |
+
```
|
| 145 |
+
|
| 146 |
+
Run multiple pair workers to claim independent cases. Each pair imports both
|
| 147 |
+
runtimes and compares geometry, UVs, corner normals, polygon material indices,
|
| 148 |
+
node graphs, and decoded image pixels. Exact agreement is relative to the
|
| 149 |
+
configured importer and SDK mapping, and is not a lossless MDL certificate.
|
| 150 |
+
Missing original resources or unequal contracts remain unqualified. A render
|
| 151 |
+
pass or a file-integrity flag cannot replace this check. Keep pair results and
|
| 152 |
+
their dependencies available for preparation and provenance readback.
|
| 153 |
+
|
| 154 |
+
After preparing a repair release, `validate_material_assets.py init
|
| 155 |
+
--runtime-changes-only` limits new independent image review to the changed
|
| 156 |
+
runtimes. The manifest still records every original pool candidate and its
|
| 157 |
+
disposition. Merge the new acceptance references with the unchanged libraries'
|
| 158 |
+
existing references before finalization; the option does not exempt unchanged
|
| 159 |
+
translated materials from acceptance verification.
|
| 160 |
+
|
| 161 |
+
Functional front defaults to `functional_front_policy: legacy_strict`, preserving
|
| 162 |
+
the existing conflict-rejection rule. The explicit `prefer_visual` research
|
| 163 |
+
option consumes a hash-bound axis in a labelled canonical frame and retains both
|
| 164 |
+
axes and their resolution. Its current shared-evidence trial reversed the sofa
|
| 165 |
+
and television in a complete scene; that functional result is rejected even
|
| 166 |
+
though material preservation passed. It is not a qualified default. The canonical
|
| 167 |
+
matrix is unchanged and solver yaw is applied once. `ambiguous`, `no_unique_front`,
|
| 168 |
+
`not_applicable` and `unknown` remain distinct; unknown opening envelopes never
|
| 169 |
+
become zero clearance.
|
| 170 |
+
|
| 171 |
+
See [NVIDIA MDL SDK](https://github.com/NVIDIA/MDL-SDK/releases/tag/2026.0.2) and
|
| 172 |
+
the [third-party notice](mdl-sdk-third-party-notice.md).
|
| 173 |
+
|
| 174 |
+
## Frozen asset validation, 2026-10-13
|
| 175 |
+
|
| 176 |
+
The fixed primary benchmark contains 545 original asset cases. All cases reached
|
| 177 |
+
a terminal result: 416 passed material-library serialization/readback and four-view
|
| 178 |
+
readability acceptance; 129 failed execution (111 explicit errors and 18 importer
|
| 179 |
+
process crashes). The independent model accepted 412; four further acceptances
|
| 180 |
+
have separate, hash-bound visual adjudications with the original rejections kept.
|
| 181 |
+
These numbers describe the configured SDK-to-Blender mapping, not lossless source
|
| 182 |
+
MDL reproduction.
|
| 183 |
+
|
| 184 |
+
The separate baseline-compatibility scope contains 268 additional variants:
|
| 185 |
+
268 passed technical readback, 264 passed appearance acceptance (261 model
|
| 186 |
+
acceptances and three documented adjudications), and four TV variants remained
|
| 187 |
+
rejected for visibly washed-out screens. They were not repaired by changing the
|
| 188 |
+
frozen exposure or replacing their images. The legacy control independently
|
| 189 |
+
accepted all 299 of its translated variants, including 15 documented adjudications.
|
| 190 |
+
|
| 191 |
+
The immutable evidence is retained on the remote experiment volume under
|
| 192 |
+
`rhg_style_joint_20261013/mdl_offline_assets_c15`, `mdl_offline_B_c16`, and
|
| 193 |
+
`material_acceptance_{B,C}_final`. The accepted index retains every accepted case's
|
| 194 |
+
own manifest and certificate, including distinct exports with equal source/runtime
|
| 195 |
+
identities. An identity with both a passing and a failing case remains excluded
|
| 196 |
+
from admission; per-case outcomes stay unchanged.
|
| 197 |
+
|
| 198 |
+
## Whole-house integration and retained failures, 2026-10-14
|
| 199 |
+
|
| 200 |
+
The merged SDK snapshot `bc486e3`, before the later upstream strict task-binding
|
| 201 |
+
check, passed the technical scene pipeline for both original 52-entity cases: binding,
|
| 202 |
+
assembly, saved reopening, independent static geometry, all 15 diagnostic views
|
| 203 |
+
at 1920 × 1280 / 256 samples, packaging and package validation. Every imported
|
| 204 |
+
material was either an accepted offline library or an unchanged native graph.
|
| 205 |
+
Both runs recorded zero MDL compile requests and no online bake-cache directory.
|
| 206 |
+
These two seeded cases use one source floor plan, 42920.
|
| 207 |
+
|
| 208 |
+
After merging upstream strict task binding, snapshot `55ae981` reran the same
|
| 209 |
+
52-entity requests. Both completed the scene pipeline, all 15 rendered views and
|
| 210 |
+
package validation, with zero online MDL compilation. Both correctly failed the
|
| 211 |
+
task-binding gate because no eligible kitchen-counter cup existed in the frozen
|
| 212 |
+
entity scope. The requests were not rewritten and robot execution was not run.
|
| 213 |
+
See the [strict-task validation receipt](offline-material-strict-task-validation-20261014.json).
|
| 214 |
+
|
| 215 |
+
The earlier frozen control matrix completed six material-integration runs, each
|
| 216 |
+
with 16 presentation views. All six first reached the effective 1,800-second CPU
|
| 217 |
+
render deadline; those failures remain in the original logs and run history.
|
| 218 |
+
Each subsequent GPU attempt rendered all views from the same verified, unchanged
|
| 219 |
+
scene and produced its own validated package. No views were selected across
|
| 220 |
+
attempts. The two legacy-control cases retained the original assets, runtime
|
| 221 |
+
hashes, native dimensions and poses. The publication entry and render handoff now
|
| 222 |
+
preserve a configured deadline longer than 1,800 seconds; focused CLI/configuration
|
| 223 |
+
and resume checks reproduced and verified this fix.
|
| 224 |
+
|
| 225 |
+
Two additional findings remain explicit failures:
|
| 226 |
+
|
| 227 |
+
- The `prefer_visual` extension preserved materials, but direct inspection of
|
| 228 |
+
both full scenes found reversed sofas and televisions. It remains an explicit
|
| 229 |
+
research option; `legacy_strict` is the default.
|
| 230 |
+
- The repaired-runtime condition passed 186 of 396 source/runtime pair checks.
|
| 231 |
+
All 186 then passed independent material validation (184 model acceptances and
|
| 232 |
+
two separate visual adjudications). Its complete pool qualified 882 of 1277
|
| 233 |
+
candidates. Both full-house cases still failed at the required countertop
|
| 234 |
+
cooktop: the release had no unique `Stovetop012` match, and the alternative whole
|
| 235 |
+
electric oven could not fill that relation. No old-source fallback was used.
|
| 236 |
+
|
| 237 |
+
See the [validation receipt](offline-material-validation-20261014.json) for
|
| 238 |
+
separate denominators, hashes, failed attempts, source-pool identities and remote
|
| 239 |
+
evidence locations. Large models, material libraries and scene packages stay on
|
| 240 |
+
the remote experiment volume.
|
| 241 |
+
|
| 242 |
+
The earlier 52-entity image sheets remain available for
|
| 243 |
+
[case 00](images/offline-mdl-20261014/case_00.jpg) and
|
| 244 |
+
[case 01](images/offline-mdl-20261014/case_01.jpg).
|
| 245 |
+
|
| 246 |
+
## Integration with required-entity completion
|
| 247 |
+
|
| 248 |
+
After upstream `6a3a9d1` added `task_entity_policy: complete_required`, merged
|
| 249 |
+
snapshot `791200d` ran two **derived 53-entity cases**. Each retains its original
|
| 250 |
+
52-entity source/request hashes and adds `kitchen__cup__task_pickup` as a separate
|
| 251 |
+
task-compiler decision. The original 52-entity failures above remain failures.
|
| 252 |
+
|
| 253 |
+
Both derived cases passed material integration, saved reopening, independent
|
| 254 |
+
static geometry, strict entity/asset/anchor binding, all 15 diagnostic views and
|
| 255 |
+
package validation. Both recorded zero online MDL compile requests and no online
|
| 256 |
+
bake-cache directory. The added cup is a measured, unscaled real asset on the
|
| 257 |
+
kitchen counter. Robot execution and physical grasp qualification were not run.
|
| 258 |
+
|
| 259 |
+
Already prepared structural-material caches were copied into independent run
|
| 260 |
+
directories, with 382 copied-content hash checks per case and unchanged original
|
| 261 |
+
source stats. The normal pipeline validated and used both copies as cache hits;
|
| 262 |
+
the source caches were not rewritten. This reuse does not alter asset acceptance
|
| 263 |
+
or material/render criteria.
|
| 264 |
+
|
| 265 |
+
See the [derived-case validation receipt](offline-material-completed-task-validation-20261014.json)
|
| 266 |
+
and the [kitchen view showing the added cup](images/offline-mdl-20261014/completed_kitchen_00.jpg).
|
| 267 |
+
|
| 268 |
+

|
| 269 |
+
|
| 270 |
+

|
docs/reproduction/public_conversion_code/packages/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"""RoboHouseGen implementation packages."""
|
docs/reproduction/public_conversion_code/packages/adapters/__init__.py
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""External runtime adapters."""
|
| 2 |
+
|
| 3 |
+
from packages.adapters.embodiedgen import (
|
| 4 |
+
EmbodiedGenAdapter,
|
| 5 |
+
EmbodiedGenSettings,
|
| 6 |
+
probe_embodiedgen,
|
| 7 |
+
)
|
| 8 |
+
from packages.adapters.sam3d import Sam3DAdapter, Sam3DSettings, probe_sam3d
|
| 9 |
+
from packages.adapters.scenesmith import (
|
| 10 |
+
RoboLabSceneObject,
|
| 11 |
+
RoboLabScenePredicate,
|
| 12 |
+
RoboLabSceneRequest,
|
| 13 |
+
SceneSmithAdapter,
|
| 14 |
+
SceneSmithSettings,
|
| 15 |
+
probe_scenesmith,
|
| 16 |
+
)
|
| 17 |
+
|
| 18 |
+
__all__ = [
|
| 19 |
+
"RoboLabSceneObject",
|
| 20 |
+
"RoboLabScenePredicate",
|
| 21 |
+
"RoboLabSceneRequest",
|
| 22 |
+
"EmbodiedGenAdapter",
|
| 23 |
+
"EmbodiedGenSettings",
|
| 24 |
+
"Sam3DAdapter",
|
| 25 |
+
"Sam3DSettings",
|
| 26 |
+
"SceneSmithAdapter",
|
| 27 |
+
"SceneSmithSettings",
|
| 28 |
+
"probe_sam3d",
|
| 29 |
+
"probe_embodiedgen",
|
| 30 |
+
"probe_scenesmith",
|
| 31 |
+
]
|
docs/reproduction/public_conversion_code/packages/adapters/arena.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import importlib.util
|
| 4 |
+
|
| 5 |
+
from packages.adapters.protocols import NotConfiguredError
|
| 6 |
+
|
| 7 |
+
ARENA_RELEASE = "release/0.2.1"
|
| 8 |
+
ISAAC_SIM_VERSION = "5.1"
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
def probe_arena() -> dict[str, str | bool]:
|
| 12 |
+
available = importlib.util.find_spec("isaaclab_arena") is not None
|
| 13 |
+
return {
|
| 14 |
+
"available": available,
|
| 15 |
+
"required_release": ARENA_RELEASE,
|
| 16 |
+
"isaac_sim_version": ISAAC_SIM_VERSION,
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
def require_arena() -> None:
|
| 21 |
+
if not probe_arena()["available"]:
|
| 22 |
+
raise NotConfiguredError(
|
| 23 |
+
"Isaac Lab-Arena is unavailable; run this command in the pinned Isaac Sim 5.1 worker"
|
| 24 |
+
)
|
docs/reproduction/public_conversion_code/packages/adapters/embodiedgen.py
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import json
|
| 4 |
+
import os
|
| 5 |
+
import shlex
|
| 6 |
+
import shutil
|
| 7 |
+
import subprocess
|
| 8 |
+
from dataclasses import dataclass
|
| 9 |
+
from pathlib import Path
|
| 10 |
+
|
| 11 |
+
from packages.adapters.protocols import NotConfiguredError
|
| 12 |
+
from packages.core.files import atomic_write_text
|
| 13 |
+
from packages.schemas.models import TaskSpec
|
| 14 |
+
|
| 15 |
+
EMBODIEDGEN_VERSION = "v2.0.0"
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
@dataclass(frozen=True, slots=True)
|
| 19 |
+
class EmbodiedGenSettings:
|
| 20 |
+
command: tuple[str, ...]
|
| 21 |
+
asset_catalog: Path | None = None
|
| 22 |
+
timeout_s: int = 3600
|
| 23 |
+
|
| 24 |
+
@classmethod
|
| 25 |
+
def from_env(cls) -> EmbodiedGenSettings:
|
| 26 |
+
command = tuple(shlex.split(os.environ.get("EMBODIEDGEN_COMMAND", "")))
|
| 27 |
+
catalog = os.environ.get("EMBODIEDGEN_ASSET_CATALOG")
|
| 28 |
+
timeout_s = int(os.environ.get("EMBODIEDGEN_TIMEOUT_S", "3600"))
|
| 29 |
+
if timeout_s <= 0:
|
| 30 |
+
raise ValueError("EMBODIEDGEN_TIMEOUT_S must be positive")
|
| 31 |
+
return cls(command, Path(catalog) if catalog else None, timeout_s)
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
def probe_embodiedgen(settings: EmbodiedGenSettings | None = None) -> dict[str, object]:
|
| 35 |
+
settings = settings or EmbodiedGenSettings.from_env()
|
| 36 |
+
executable = settings.command[0] if settings.command else ""
|
| 37 |
+
command_ready = bool(executable) and (
|
| 38 |
+
Path(executable).is_file() or shutil.which(executable) is not None
|
| 39 |
+
)
|
| 40 |
+
catalog_ready = settings.asset_catalog is None or settings.asset_catalog.is_file()
|
| 41 |
+
return {
|
| 42 |
+
"configured": bool(settings.command),
|
| 43 |
+
"ready": command_ready and catalog_ready,
|
| 44 |
+
"command": list(settings.command),
|
| 45 |
+
"command_ready": command_ready,
|
| 46 |
+
"asset_catalog": str(settings.asset_catalog) if settings.asset_catalog else None,
|
| 47 |
+
"asset_catalog_ready": catalog_ready,
|
| 48 |
+
"timeout_s": settings.timeout_s,
|
| 49 |
+
"version": EMBODIEDGEN_VERSION,
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
class EmbodiedGenAdapter:
|
| 54 |
+
"""File-protocol task/affordance adapter for the isolated upstream environment."""
|
| 55 |
+
|
| 56 |
+
def __init__(
|
| 57 |
+
self,
|
| 58 |
+
command: list[str] | tuple[str, ...] | None = None,
|
| 59 |
+
asset_catalog: Path | None = None,
|
| 60 |
+
timeout_s: int | None = None,
|
| 61 |
+
) -> None:
|
| 62 |
+
if command is None:
|
| 63 |
+
settings = EmbodiedGenSettings.from_env()
|
| 64 |
+
self.command = list(settings.command)
|
| 65 |
+
self.asset_catalog = asset_catalog or settings.asset_catalog
|
| 66 |
+
self.timeout_s = timeout_s or settings.timeout_s
|
| 67 |
+
else:
|
| 68 |
+
self.command = list(command)
|
| 69 |
+
self.asset_catalog = asset_catalog
|
| 70 |
+
self.timeout_s = timeout_s or 3600
|
| 71 |
+
|
| 72 |
+
def version(self) -> str:
|
| 73 |
+
return EMBODIEDGEN_VERSION
|
| 74 |
+
|
| 75 |
+
def compile(self, task: TaskSpec, output_dir: Path) -> Path:
|
| 76 |
+
if not self.command:
|
| 77 |
+
raise NotConfiguredError("EmbodiedGen command is not configured")
|
| 78 |
+
output_dir.mkdir(parents=True, exist_ok=True)
|
| 79 |
+
request = output_dir / "embodiedgen_request.json"
|
| 80 |
+
atomic_write_text(request, task.model_dump_json(indent=2))
|
| 81 |
+
command = [*self.command, "--request", str(request), "--output", str(output_dir)]
|
| 82 |
+
if self.asset_catalog is not None:
|
| 83 |
+
if not self.asset_catalog.is_file():
|
| 84 |
+
raise FileNotFoundError(self.asset_catalog)
|
| 85 |
+
command.extend(["--asset-catalog", str(self.asset_catalog.resolve())])
|
| 86 |
+
result = subprocess.run(
|
| 87 |
+
command,
|
| 88 |
+
check=False,
|
| 89 |
+
capture_output=True,
|
| 90 |
+
text=True,
|
| 91 |
+
timeout=self.timeout_s,
|
| 92 |
+
)
|
| 93 |
+
manifest = output_dir / "task_manifest.json"
|
| 94 |
+
if result.returncode != 0:
|
| 95 |
+
raise RuntimeError(f"EmbodiedGen failed ({result.returncode}): {result.stderr[-2000:]}")
|
| 96 |
+
if not manifest.exists():
|
| 97 |
+
raise RuntimeError("EmbodiedGen did not produce task_manifest.json")
|
| 98 |
+
payload = json.loads(manifest.read_text(encoding="utf-8"))
|
| 99 |
+
if payload.get("status") != "complete":
|
| 100 |
+
raise RuntimeError("EmbodiedGen task stage did not report complete status")
|
| 101 |
+
if payload.get("backend") != "embodiedgen-v2":
|
| 102 |
+
raise RuntimeError("EmbodiedGen task stage reported an unexpected backend")
|
| 103 |
+
if payload.get("task_id") != task.task_id:
|
| 104 |
+
raise RuntimeError("EmbodiedGen task stage task_id does not match the request")
|
| 105 |
+
return manifest
|
docs/reproduction/public_conversion_code/packages/adapters/protocols.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from pathlib import Path
|
| 4 |
+
from typing import Protocol
|
| 5 |
+
|
| 6 |
+
from packages.schemas.models import RobotCapabilityProfile
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
class NotConfiguredError(RuntimeError):
|
| 10 |
+
pass
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
class SceneAuthoringProvider(Protocol):
|
| 14 |
+
def version(self) -> str: ...
|
| 15 |
+
|
| 16 |
+
def author(self, scene: object, output_dir: Path) -> Path: ...
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
class RobotEmbodimentProvider(Protocol):
|
| 20 |
+
def profile(self) -> RobotCapabilityProfile: ...
|
| 21 |
+
|
| 22 |
+
def compose_robot_layer(self, output_dir: Path) -> Path: ...
|
| 23 |
+
|
| 24 |
+
def validate(self, root_usd: Path) -> dict[str, object]: ...
|
docs/reproduction/public_conversion_code/packages/adapters/rp1.py
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import json
|
| 4 |
+
import subprocess
|
| 5 |
+
from pathlib import Path
|
| 6 |
+
|
| 7 |
+
from packages.adapters.arena import require_arena
|
| 8 |
+
from packages.robots.profiles import get_robot_profile
|
| 9 |
+
from packages.schemas.models import RobotCapabilityProfile
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
class RP13EmbodimentProvider:
|
| 13 |
+
"""RP1.3 provider boundary for the Isaac worker.
|
| 14 |
+
|
| 15 |
+
USD conversion and articulation validation execute only inside the Arena worker. The
|
| 16 |
+
core environment can still inspect the capability contract without importing Isaac.
|
| 17 |
+
"""
|
| 18 |
+
|
| 19 |
+
def __init__(
|
| 20 |
+
self,
|
| 21 |
+
converter_command: list[str] | None = None,
|
| 22 |
+
validator_command: list[str] | None = None,
|
| 23 |
+
) -> None:
|
| 24 |
+
self.converter_command = converter_command
|
| 25 |
+
self.validator_command = validator_command
|
| 26 |
+
|
| 27 |
+
def profile(self) -> RobotCapabilityProfile:
|
| 28 |
+
return get_robot_profile("rp1_3")
|
| 29 |
+
|
| 30 |
+
def compose_robot_layer(self, output_dir: Path) -> Path:
|
| 31 |
+
require_arena()
|
| 32 |
+
if not self.converter_command:
|
| 33 |
+
raise RuntimeError("RP1.3 converter command is not configured")
|
| 34 |
+
output_dir.mkdir(parents=True, exist_ok=True)
|
| 35 |
+
target = output_dir / "robot.usda"
|
| 36 |
+
result = subprocess.run(
|
| 37 |
+
[*self.converter_command, "--robot", "rp1_3", "--output", str(target)],
|
| 38 |
+
check=False,
|
| 39 |
+
capture_output=True,
|
| 40 |
+
text=True,
|
| 41 |
+
)
|
| 42 |
+
if result.returncode or not target.exists():
|
| 43 |
+
raise RuntimeError(f"RP1.3 conversion failed: {result.stderr[-2000:]}")
|
| 44 |
+
return target
|
| 45 |
+
|
| 46 |
+
def validate(self, root_usd: Path) -> dict[str, object]:
|
| 47 |
+
require_arena()
|
| 48 |
+
if not self.validator_command:
|
| 49 |
+
raise RuntimeError("RP1.3 validator command is not configured")
|
| 50 |
+
result = subprocess.run(
|
| 51 |
+
[*self.validator_command, "--robot", "rp1_3", "--scene", str(root_usd)],
|
| 52 |
+
check=False,
|
| 53 |
+
capture_output=True,
|
| 54 |
+
text=True,
|
| 55 |
+
)
|
| 56 |
+
if result.returncode:
|
| 57 |
+
raise RuntimeError(f"RP1.3 validation failed: {result.stderr[-2000:]}")
|
| 58 |
+
report: dict[str, object] = json.loads(result.stdout)
|
| 59 |
+
return report
|
docs/reproduction/public_conversion_code/packages/adapters/rparena.py
ADDED
|
@@ -0,0 +1,823 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Export RoboHouseGen outputs through the RPArena generator interface v1."""
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
import hashlib
|
| 6 |
+
import json
|
| 7 |
+
import math
|
| 8 |
+
import os
|
| 9 |
+
import re
|
| 10 |
+
import shutil
|
| 11 |
+
import subprocess
|
| 12 |
+
import sys
|
| 13 |
+
import tempfile
|
| 14 |
+
from pathlib import Path
|
| 15 |
+
from typing import Annotated, Any, Literal
|
| 16 |
+
|
| 17 |
+
from pydantic import BaseModel, ConfigDict, Field, model_validator
|
| 18 |
+
|
| 19 |
+
from packages.benchmark.packager import BenchmarkPackager
|
| 20 |
+
from packages.core.files import atomic_write_text
|
| 21 |
+
from packages.scene_generation.pick_move_place import PickMovePlaceTask
|
| 22 |
+
from packages.schemas.models import (
|
| 23 |
+
DifficultyVector,
|
| 24 |
+
PredicateSpec,
|
| 25 |
+
SceneLayerPlan,
|
| 26 |
+
SceneManifest,
|
| 27 |
+
SkillInvocation,
|
| 28 |
+
TaskEntity,
|
| 29 |
+
TaskPlan,
|
| 30 |
+
TaskSpec,
|
| 31 |
+
)
|
| 32 |
+
from packages.version import API_COMPAT_VERSION
|
| 33 |
+
|
| 34 |
+
INTERFACE_SCHEMA_VERSION = "rparena.generator-interface/1.0"
|
| 35 |
+
INTERFACE_MANIFEST = "manifests/rparena_interface.json"
|
| 36 |
+
ADAPTER_VERSION = "robothousegen.asset-first-pick-move-place/1.0"
|
| 37 |
+
EXPORT_RESULT_SCHEMA_VERSION = "robothousegen.rparena-export-result/1.0"
|
| 38 |
+
USD_INSPECTION_SCHEMA_VERSION = "robothousegen.rparena-usd-inspection/1.0"
|
| 39 |
+
|
| 40 |
+
_SHA256 = re.compile(r"^[0-9a-f]{64}$")
|
| 41 |
+
_NonEmptyString = Annotated[str, Field(min_length=1)]
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
class _StrictModel(BaseModel):
|
| 45 |
+
model_config = ConfigDict(extra="forbid")
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
class RPArenaProducer(_StrictModel):
|
| 49 |
+
name: str = Field(min_length=1)
|
| 50 |
+
version: str = Field(min_length=1)
|
| 51 |
+
adapter: str = Field(min_length=1)
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
class RPArenaBundlePaths(_StrictModel):
|
| 55 |
+
root_usd: Literal["root.usda"]
|
| 56 |
+
scene_usd: Literal["scenesmith/scene.usdc"]
|
| 57 |
+
scene_manifest: Literal["manifests/scene.json"]
|
| 58 |
+
task_manifest: Literal["manifests/task.json"]
|
| 59 |
+
episode_manifest: Literal["manifests/episode.json"]
|
| 60 |
+
evaluator_manifest: Literal["manifests/evaluator.json"]
|
| 61 |
+
robot_manifest: Literal["manifests/robot.json"]
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
class RPArenaContract(_StrictModel):
|
| 65 |
+
bundle_type: Literal["single_episode"]
|
| 66 |
+
task_type: str = Field(pattern=r"^[a-z][a-z0-9_]*$")
|
| 67 |
+
evaluator: Literal["predicate_graph_v1"]
|
| 68 |
+
entity_binding: Literal["absolute_world_prim_paths"]
|
| 69 |
+
physics_authoring: Literal["consumer"]
|
| 70 |
+
robot_embodiment: Literal["consumer"]
|
| 71 |
+
coordinate_system: Literal["usd_z_up_right_handed_metres"]
|
| 72 |
+
checksums: Literal["sha256_complete"]
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
class RPArenaIdentity(_StrictModel):
|
| 76 |
+
scene_id: str = Field(min_length=1)
|
| 77 |
+
task_id: str = Field(min_length=1)
|
| 78 |
+
episode_id: str = Field(min_length=1)
|
| 79 |
+
entity_ids: list[_NonEmptyString] = Field(
|
| 80 |
+
min_length=1,
|
| 81 |
+
json_schema_extra={"uniqueItems": True},
|
| 82 |
+
)
|
| 83 |
+
manipulated_entity_ids: list[_NonEmptyString] = Field(
|
| 84 |
+
min_length=1,
|
| 85 |
+
json_schema_extra={"uniqueItems": True},
|
| 86 |
+
)
|
| 87 |
+
|
| 88 |
+
@model_validator(mode="after")
|
| 89 |
+
def validate_entity_ids(self) -> RPArenaIdentity:
|
| 90 |
+
if self.entity_ids != sorted(set(self.entity_ids)):
|
| 91 |
+
raise ValueError("entity_ids must be sorted and unique")
|
| 92 |
+
if self.manipulated_entity_ids != sorted(set(self.manipulated_entity_ids)):
|
| 93 |
+
raise ValueError("manipulated_entity_ids must be sorted and unique")
|
| 94 |
+
if not set(self.manipulated_entity_ids).issubset(self.entity_ids):
|
| 95 |
+
raise ValueError("manipulated_entity_ids must be scene entities")
|
| 96 |
+
return self
|
| 97 |
+
|
| 98 |
+
|
| 99 |
+
class RPArenaSource(_StrictModel):
|
| 100 |
+
kind: str = Field(min_length=1)
|
| 101 |
+
source_task_id: str = Field(min_length=1)
|
| 102 |
+
source_digest: str = Field(pattern=r"^[0-9a-f]{64}$")
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
class RPArenaInterfaceV1(_StrictModel):
|
| 106 |
+
model_config = ConfigDict(
|
| 107 |
+
extra="forbid",
|
| 108 |
+
json_schema_extra={"$schema": "https://json-schema.org/draft/2020-12/schema"},
|
| 109 |
+
)
|
| 110 |
+
|
| 111 |
+
schema_version: Literal["rparena.generator-interface/1.0"]
|
| 112 |
+
producer: RPArenaProducer
|
| 113 |
+
bundle: RPArenaBundlePaths
|
| 114 |
+
contract: RPArenaContract
|
| 115 |
+
identity: RPArenaIdentity
|
| 116 |
+
source: RPArenaSource
|
| 117 |
+
|
| 118 |
+
|
| 119 |
+
class RPArenaExportResult(_StrictModel):
|
| 120 |
+
schema_version: Literal["robothousegen.rparena-export-result/1.0"] = (
|
| 121 |
+
"robothousegen.rparena-export-result/1.0"
|
| 122 |
+
)
|
| 123 |
+
bundle_root: Path
|
| 124 |
+
interface_manifest: Path
|
| 125 |
+
scene_id: str
|
| 126 |
+
task_id: str
|
| 127 |
+
episode_id: str
|
| 128 |
+
source_digest: str
|
| 129 |
+
scene_usd_sha256: str
|
| 130 |
+
entity_prim_paths: dict[str, str]
|
| 131 |
+
checksummed_file_count: int
|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
def _sha256(path: Path) -> str:
|
| 135 |
+
digest = hashlib.sha256()
|
| 136 |
+
with path.open("rb") as stream:
|
| 137 |
+
for chunk in iter(lambda: stream.read(1024 * 1024), b""):
|
| 138 |
+
digest.update(chunk)
|
| 139 |
+
return digest.hexdigest()
|
| 140 |
+
|
| 141 |
+
|
| 142 |
+
def _canonical_sha256(value: object) -> str:
|
| 143 |
+
payload = json.dumps(
|
| 144 |
+
value,
|
| 145 |
+
ensure_ascii=False,
|
| 146 |
+
sort_keys=True,
|
| 147 |
+
separators=(",", ":"),
|
| 148 |
+
allow_nan=False,
|
| 149 |
+
).encode("utf-8")
|
| 150 |
+
return hashlib.sha256(payload).hexdigest()
|
| 151 |
+
|
| 152 |
+
|
| 153 |
+
def _reject_constant(value: str) -> None:
|
| 154 |
+
raise ValueError(f"JSON contains non-finite value {value!r}")
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
def _unique_object(pairs: list[tuple[str, Any]]) -> dict[str, Any]:
|
| 158 |
+
value: dict[str, Any] = {}
|
| 159 |
+
for key, item in pairs:
|
| 160 |
+
if key in value:
|
| 161 |
+
raise ValueError(f"JSON contains duplicate key {key!r}")
|
| 162 |
+
value[key] = item
|
| 163 |
+
return value
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
def _regular_file(path: Path, *, label: str) -> Path:
|
| 167 |
+
unresolved = path.expanduser()
|
| 168 |
+
if unresolved.is_symlink():
|
| 169 |
+
raise ValueError(f"{label} must be a non-symlink regular file: {path}")
|
| 170 |
+
resolved = unresolved.resolve(strict=True)
|
| 171 |
+
if not resolved.is_file():
|
| 172 |
+
raise ValueError(f"{label} must be a non-symlink regular file: {path}")
|
| 173 |
+
return resolved
|
| 174 |
+
|
| 175 |
+
|
| 176 |
+
def _executable_file(path: Path, *, label: str) -> Path:
|
| 177 |
+
executable = path.expanduser().absolute()
|
| 178 |
+
if not executable.is_file() or not os.access(executable, os.X_OK):
|
| 179 |
+
raise ValueError(f"{label} must resolve to an executable file: {path}")
|
| 180 |
+
return executable
|
| 181 |
+
|
| 182 |
+
|
| 183 |
+
def _source_directory(path: str | Path) -> Path:
|
| 184 |
+
unresolved = Path(path).expanduser()
|
| 185 |
+
if unresolved.is_symlink():
|
| 186 |
+
raise ValueError(f"source must be a non-symlink directory: {path}")
|
| 187 |
+
source = unresolved.resolve(strict=True)
|
| 188 |
+
if not source.is_dir():
|
| 189 |
+
raise ValueError(f"source must be a non-symlink directory: {path}")
|
| 190 |
+
return source
|
| 191 |
+
|
| 192 |
+
|
| 193 |
+
def _json_object(path: Path, *, label: str) -> dict[str, Any]:
|
| 194 |
+
source = _regular_file(path, label=label)
|
| 195 |
+
try:
|
| 196 |
+
value = json.loads(
|
| 197 |
+
source.read_text(encoding="utf-8"),
|
| 198 |
+
object_pairs_hook=_unique_object,
|
| 199 |
+
parse_constant=_reject_constant,
|
| 200 |
+
)
|
| 201 |
+
except (OSError, UnicodeError, json.JSONDecodeError) as exc:
|
| 202 |
+
raise ValueError(f"{label} is not valid UTF-8 JSON: {source}") from exc
|
| 203 |
+
if not isinstance(value, dict):
|
| 204 |
+
raise ValueError(f"{label} must contain a JSON object")
|
| 205 |
+
return value
|
| 206 |
+
|
| 207 |
+
|
| 208 |
+
def _nonempty(value: object, *, field: str) -> str:
|
| 209 |
+
text = value.strip() if isinstance(value, str) else ""
|
| 210 |
+
if not text:
|
| 211 |
+
raise ValueError(f"{field} must be a non-empty string")
|
| 212 |
+
return text
|
| 213 |
+
|
| 214 |
+
|
| 215 |
+
def _finite(value: object, *, field: str) -> float:
|
| 216 |
+
if isinstance(value, bool) or not isinstance(value, (int, float)):
|
| 217 |
+
raise ValueError(f"{field} must be a finite number")
|
| 218 |
+
result = float(value)
|
| 219 |
+
if not math.isfinite(result):
|
| 220 |
+
raise ValueError(f"{field} must be a finite number")
|
| 221 |
+
return result
|
| 222 |
+
|
| 223 |
+
|
| 224 |
+
def _vector(value: object, *, field: str, length: int) -> list[float]:
|
| 225 |
+
if not isinstance(value, (list, tuple)) or len(value) != length:
|
| 226 |
+
raise ValueError(f"{field} must contain exactly {length} numbers")
|
| 227 |
+
return [_finite(item, field=f"{field}[{index}]") for index, item in enumerate(value)]
|
| 228 |
+
|
| 229 |
+
|
| 230 |
+
def _slug(value: object) -> str:
|
| 231 |
+
result = re.sub(r"[^a-z0-9]+", "-", _nonempty(value, field="id").casefold()).strip("-")
|
| 232 |
+
if not result:
|
| 233 |
+
raise ValueError("id cannot be normalized to an empty slug")
|
| 234 |
+
return result
|
| 235 |
+
|
| 236 |
+
|
| 237 |
+
def _write_json(path: Path, value: object) -> None:
|
| 238 |
+
path.parent.mkdir(parents=True, exist_ok=True)
|
| 239 |
+
payload: Any
|
| 240 |
+
if isinstance(value, BaseModel):
|
| 241 |
+
payload = value.model_dump(mode="json")
|
| 242 |
+
else:
|
| 243 |
+
payload = value
|
| 244 |
+
atomic_write_text(
|
| 245 |
+
path,
|
| 246 |
+
json.dumps(payload, ensure_ascii=False, indent=2, sort_keys=True) + "\n",
|
| 247 |
+
)
|
| 248 |
+
|
| 249 |
+
|
| 250 |
+
def _validate_source(
|
| 251 |
+
source: Path,
|
| 252 |
+
) -> tuple[dict[str, Any], PickMovePlaceTask, list[dict[str, Any]], dict[str, str], str]:
|
| 253 |
+
composition_path = source / "composition_manifest.json"
|
| 254 |
+
task_path = source / "pick_move_place_task.json"
|
| 255 |
+
blend_path = source / "asset_first_scene.blend"
|
| 256 |
+
composition = _json_object(composition_path, label="asset-first composition manifest")
|
| 257 |
+
if composition.get("schema_version") != "2.0":
|
| 258 |
+
raise ValueError("composition_manifest.json schema_version must be 2.0")
|
| 259 |
+
task_value = _json_object(task_path, label="asset-first pick-move-place task")
|
| 260 |
+
task = PickMovePlaceTask.model_validate(task_value)
|
| 261 |
+
if composition.get("task") != task.model_dump(mode="json"):
|
| 262 |
+
raise ValueError("composition embedded task differs from pick_move_place_task.json")
|
| 263 |
+
if task.passed is not True:
|
| 264 |
+
raise ValueError("asset-first task did not pass its declared validation")
|
| 265 |
+
|
| 266 |
+
raw_entities = composition.get("entities")
|
| 267 |
+
if not isinstance(raw_entities, list) or not raw_entities:
|
| 268 |
+
raise ValueError("composition manifest must contain entities")
|
| 269 |
+
entities: list[dict[str, Any]] = []
|
| 270 |
+
entity_ids: list[str] = []
|
| 271 |
+
for index, raw_entity in enumerate(raw_entities):
|
| 272 |
+
if not isinstance(raw_entity, dict):
|
| 273 |
+
raise ValueError(f"composition entities[{index}] must be an object")
|
| 274 |
+
entity = dict(raw_entity)
|
| 275 |
+
entity_id = _nonempty(entity.get("entity_id"), field=f"entities[{index}].entity_id")
|
| 276 |
+
dimensions = _vector(
|
| 277 |
+
entity.get("dimensions_m"),
|
| 278 |
+
field=f"{entity_id}.dimensions_m",
|
| 279 |
+
length=3,
|
| 280 |
+
)
|
| 281 |
+
if any(value <= 0.0 for value in dimensions):
|
| 282 |
+
raise ValueError(f"{entity_id}.dimensions_m must be positive")
|
| 283 |
+
_vector(entity.get("center_xy_m"), field=f"{entity_id}.center_xy_m", length=2)
|
| 284 |
+
_finite(entity.get("base_z_m"), field=f"{entity_id}.base_z_m")
|
| 285 |
+
_finite(entity.get("yaw_deg"), field=f"{entity_id}.yaw_deg")
|
| 286 |
+
for digest_field in ("asset_sha256", "runtime_sha256"):
|
| 287 |
+
digest = entity.get(digest_field)
|
| 288 |
+
if digest is not None and _SHA256.fullmatch(str(digest)) is None:
|
| 289 |
+
raise ValueError(f"{entity_id}.{digest_field} must be a SHA-256 digest")
|
| 290 |
+
entity_ids.append(entity_id)
|
| 291 |
+
entities.append(entity)
|
| 292 |
+
if entity_ids != list(dict.fromkeys(entity_ids)) or len(entity_ids) != len(set(entity_ids)):
|
| 293 |
+
raise ValueError("composition entity IDs must be unique")
|
| 294 |
+
|
| 295 |
+
critical = {
|
| 296 |
+
task.movable_object_entity_id,
|
| 297 |
+
task.source_support_entity_id,
|
| 298 |
+
task.target_support_entity_id,
|
| 299 |
+
}
|
| 300 |
+
if len(critical) != 3 or not critical.issubset(entity_ids):
|
| 301 |
+
raise ValueError("task critical entities are missing or not distinct")
|
| 302 |
+
by_id = {str(item["entity_id"]): item for item in entities}
|
| 303 |
+
if by_id[task.movable_object_entity_id].get("parent_entity_id") != (
|
| 304 |
+
task.source_support_entity_id
|
| 305 |
+
):
|
| 306 |
+
raise ValueError("movable object is not parented to the declared source support")
|
| 307 |
+
|
| 308 |
+
source_hashes = {
|
| 309 |
+
"asset_first_scene.blend": _sha256(
|
| 310 |
+
_regular_file(blend_path, label="asset-first Blender scene")
|
| 311 |
+
),
|
| 312 |
+
"composition_manifest.json": _sha256(composition_path),
|
| 313 |
+
"pick_move_place_task.json": _sha256(task_path),
|
| 314 |
+
}
|
| 315 |
+
metric_path = source / "metric_layout_spec.json"
|
| 316 |
+
if metric_path.exists() or metric_path.is_symlink():
|
| 317 |
+
metric = _regular_file(metric_path, label="asset-first metric layout")
|
| 318 |
+
metric_digest = _sha256(metric)
|
| 319 |
+
declared_digest = composition.get("metric_layout_spec_sha256")
|
| 320 |
+
if declared_digest is not None and declared_digest != metric_digest:
|
| 321 |
+
raise ValueError("metric_layout_spec.json differs from composition identity")
|
| 322 |
+
source_hashes["metric_layout_spec.json"] = metric_digest
|
| 323 |
+
source_digest = _canonical_sha256(source_hashes)
|
| 324 |
+
return composition, task, entities, source_hashes, source_digest
|
| 325 |
+
|
| 326 |
+
|
| 327 |
+
def _run_blender_export(
|
| 328 |
+
source: Path,
|
| 329 |
+
destination_scene: Path,
|
| 330 |
+
*,
|
| 331 |
+
blender_executable: str | Path,
|
| 332 |
+
blender_export_script: str | Path,
|
| 333 |
+
timeout_s: float,
|
| 334 |
+
) -> dict[str, Any]:
|
| 335 |
+
blender = _executable_file(Path(blender_executable), label="Blender executable")
|
| 336 |
+
exporter = _regular_file(Path(blender_export_script), label="Blender export script")
|
| 337 |
+
blend = _regular_file(source / "asset_first_scene.blend", label="asset-first Blender scene")
|
| 338 |
+
destination_scene.parent.mkdir(parents=True, exist_ok=True)
|
| 339 |
+
command = [
|
| 340 |
+
str(blender),
|
| 341 |
+
"--background",
|
| 342 |
+
"--python",
|
| 343 |
+
str(exporter),
|
| 344 |
+
"--",
|
| 345 |
+
str(blend),
|
| 346 |
+
str(destination_scene),
|
| 347 |
+
]
|
| 348 |
+
completed = subprocess.run(
|
| 349 |
+
command,
|
| 350 |
+
cwd=source,
|
| 351 |
+
stdin=subprocess.DEVNULL,
|
| 352 |
+
capture_output=True,
|
| 353 |
+
text=True,
|
| 354 |
+
timeout=timeout_s,
|
| 355 |
+
check=False,
|
| 356 |
+
)
|
| 357 |
+
if completed.returncode != 0:
|
| 358 |
+
raise RuntimeError(
|
| 359 |
+
"Blender USD export failed with exit code "
|
| 360 |
+
f"{completed.returncode}:\n{completed.stderr[-4000:]}"
|
| 361 |
+
)
|
| 362 |
+
if not destination_scene.is_file() or destination_scene.stat().st_size == 0:
|
| 363 |
+
raise RuntimeError("Blender exited successfully without producing scene.usdc")
|
| 364 |
+
def sanitize(text: str) -> str:
|
| 365 |
+
return text.replace(str(source), "<SOURCE>").replace(
|
| 366 |
+
str(destination_scene.parent.parent), "<BUNDLE>"
|
| 367 |
+
)
|
| 368 |
+
return {
|
| 369 |
+
"blender_sha256": _sha256(blender),
|
| 370 |
+
"export_script_sha256": _sha256(exporter),
|
| 371 |
+
"return_code": completed.returncode,
|
| 372 |
+
"stdout_tail": sanitize(completed.stdout[-4000:]),
|
| 373 |
+
"stderr_tail": sanitize(completed.stderr[-4000:]),
|
| 374 |
+
}
|
| 375 |
+
|
| 376 |
+
|
| 377 |
+
def _run_usd_inspection(
|
| 378 |
+
scene_usd: Path,
|
| 379 |
+
cleanup_layer: Path,
|
| 380 |
+
entity_ids: list[str],
|
| 381 |
+
*,
|
| 382 |
+
usd_python: str | Path | None,
|
| 383 |
+
timeout_s: float,
|
| 384 |
+
) -> dict[str, Any]:
|
| 385 |
+
executable = _executable_file(
|
| 386 |
+
Path(usd_python or os.environ.get("RHG_USD_PYTHON") or sys.executable),
|
| 387 |
+
label="OpenUSD Python executable",
|
| 388 |
+
)
|
| 389 |
+
request_path = cleanup_layer.parent / ".rparena_usd_request.json"
|
| 390 |
+
_write_json(
|
| 391 |
+
request_path,
|
| 392 |
+
{
|
| 393 |
+
"scene_usd": str(scene_usd.resolve()),
|
| 394 |
+
"cleanup_layer": str(cleanup_layer.resolve(strict=False)),
|
| 395 |
+
"entity_ids": sorted(entity_ids),
|
| 396 |
+
},
|
| 397 |
+
)
|
| 398 |
+
project_root = Path(__file__).resolve().parents[2]
|
| 399 |
+
worker_script = Path(__file__).with_name("rparena_usd_worker.py").resolve(strict=True)
|
| 400 |
+
try:
|
| 401 |
+
completed = subprocess.run(
|
| 402 |
+
[
|
| 403 |
+
str(executable),
|
| 404 |
+
str(worker_script),
|
| 405 |
+
"--request",
|
| 406 |
+
str(request_path),
|
| 407 |
+
],
|
| 408 |
+
cwd=project_root,
|
| 409 |
+
stdin=subprocess.DEVNULL,
|
| 410 |
+
capture_output=True,
|
| 411 |
+
text=True,
|
| 412 |
+
timeout=timeout_s,
|
| 413 |
+
check=False,
|
| 414 |
+
)
|
| 415 |
+
finally:
|
| 416 |
+
request_path.unlink(missing_ok=True)
|
| 417 |
+
if completed.returncode != 0:
|
| 418 |
+
detail = completed.stderr.strip() or completed.stdout.strip() or "unknown error"
|
| 419 |
+
raise RuntimeError(f"RPArena OpenUSD inspection failed: {detail[-4000:]}")
|
| 420 |
+
try:
|
| 421 |
+
report = json.loads(completed.stdout.strip().splitlines()[-1])
|
| 422 |
+
except (IndexError, json.JSONDecodeError) as exc:
|
| 423 |
+
raise RuntimeError("RPArena OpenUSD inspection returned invalid JSON") from exc
|
| 424 |
+
if (
|
| 425 |
+
not isinstance(report, dict)
|
| 426 |
+
or report.get("schema_version") != USD_INSPECTION_SCHEMA_VERSION
|
| 427 |
+
):
|
| 428 |
+
raise RuntimeError("RPArena OpenUSD inspection returned an unsupported schema")
|
| 429 |
+
bindings = report.get("entity_prim_paths")
|
| 430 |
+
if not isinstance(bindings, dict) or sorted(bindings) != sorted(entity_ids):
|
| 431 |
+
raise RuntimeError("RPArena OpenUSD inspection returned incomplete entity bindings")
|
| 432 |
+
if not cleanup_layer.is_file():
|
| 433 |
+
raise RuntimeError("RPArena OpenUSD inspection did not create the cleanup layer")
|
| 434 |
+
return report
|
| 435 |
+
|
| 436 |
+
|
| 437 |
+
def _task_spec(
|
| 438 |
+
task: PickMovePlaceTask,
|
| 439 |
+
entities: list[dict[str, Any]],
|
| 440 |
+
*,
|
| 441 |
+
task_id: str,
|
| 442 |
+
seed: int,
|
| 443 |
+
manipulated_mass_kg: float,
|
| 444 |
+
) -> TaskSpec:
|
| 445 |
+
movable = task.movable_object_entity_id
|
| 446 |
+
source_support = task.source_support_entity_id
|
| 447 |
+
target_support = task.target_support_entity_id
|
| 448 |
+
task_entities: list[TaskEntity] = []
|
| 449 |
+
for entity in entities:
|
| 450 |
+
entity_id = str(entity["entity_id"])
|
| 451 |
+
role: Literal["MANIPULATED", "TARGET", "CONTEXT"] = (
|
| 452 |
+
"MANIPULATED"
|
| 453 |
+
if entity_id == movable
|
| 454 |
+
else "TARGET"
|
| 455 |
+
if entity_id == target_support
|
| 456 |
+
else "CONTEXT"
|
| 457 |
+
)
|
| 458 |
+
attributes = {
|
| 459 |
+
key: entity[key]
|
| 460 |
+
for key in (
|
| 461 |
+
"asset_id",
|
| 462 |
+
"asset_sha256",
|
| 463 |
+
"runtime_sha256",
|
| 464 |
+
"dimensions_m",
|
| 465 |
+
"center_xy_m",
|
| 466 |
+
"base_z_m",
|
| 467 |
+
"yaw_deg",
|
| 468 |
+
"parent_entity_id",
|
| 469 |
+
"support_type",
|
| 470 |
+
)
|
| 471 |
+
if entity.get(key) is not None
|
| 472 |
+
}
|
| 473 |
+
if role == "MANIPULATED":
|
| 474 |
+
attributes.update(
|
| 475 |
+
{
|
| 476 |
+
"mass_kg": manipulated_mass_kg,
|
| 477 |
+
"rigid_body": True,
|
| 478 |
+
"collision": "convex_hull",
|
| 479 |
+
"require_collision": True,
|
| 480 |
+
}
|
| 481 |
+
)
|
| 482 |
+
task_entities.append(
|
| 483 |
+
TaskEntity(
|
| 484 |
+
entity_id=entity_id,
|
| 485 |
+
role=role,
|
| 486 |
+
category=_nonempty(entity.get("category"), field=f"{entity_id}.category"),
|
| 487 |
+
attributes=attributes,
|
| 488 |
+
required=True,
|
| 489 |
+
)
|
| 490 |
+
)
|
| 491 |
+
|
| 492 |
+
instruction = (
|
| 493 |
+
f"Navigate from the generated start pose to {source_support}, grasp {movable}, "
|
| 494 |
+
f"follow the generated route, place it on {target_support}, release it, and "
|
| 495 |
+
"finish in a stable stance."
|
| 496 |
+
)
|
| 497 |
+
plan = TaskPlan(
|
| 498 |
+
plan_id=f"plan-{task_id.removeprefix('task-')}",
|
| 499 |
+
natural_language=instruction,
|
| 500 |
+
skills=[
|
| 501 |
+
SkillInvocation(
|
| 502 |
+
invocation_id="navigate_to_source",
|
| 503 |
+
skill_id="navigate",
|
| 504 |
+
parameters={"target": source_support},
|
| 505 |
+
),
|
| 506 |
+
SkillInvocation(
|
| 507 |
+
invocation_id="grasp_object",
|
| 508 |
+
skill_id="grasp",
|
| 509 |
+
parameters={"object": movable},
|
| 510 |
+
depends_on=["navigate_to_source"],
|
| 511 |
+
),
|
| 512 |
+
SkillInvocation(
|
| 513 |
+
invocation_id="carry_to_target",
|
| 514 |
+
skill_id="carry",
|
| 515 |
+
parameters={"object": movable, "target": target_support},
|
| 516 |
+
depends_on=["grasp_object"],
|
| 517 |
+
),
|
| 518 |
+
SkillInvocation(
|
| 519 |
+
invocation_id="place_object",
|
| 520 |
+
skill_id="place",
|
| 521 |
+
parameters={"object": movable, "support": target_support},
|
| 522 |
+
depends_on=["carry_to_target"],
|
| 523 |
+
),
|
| 524 |
+
SkillInvocation(
|
| 525 |
+
invocation_id="release_object",
|
| 526 |
+
skill_id="release",
|
| 527 |
+
parameters={"object": movable},
|
| 528 |
+
depends_on=["place_object"],
|
| 529 |
+
),
|
| 530 |
+
],
|
| 531 |
+
required_capabilities={"locomotion", "grasp", "carry", "place", "release"},
|
| 532 |
+
difficulty=DifficultyVector(
|
| 533 |
+
body=0.65,
|
| 534 |
+
manipulation=0.8,
|
| 535 |
+
cognition=0.35,
|
| 536 |
+
body_reason="Navigate a generated indoor route while carrying an object.",
|
| 537 |
+
manipulation_reason="Grasp, transport, place, and release a generated object.",
|
| 538 |
+
cognition_reason="Follow a fixed pick-move-place sequence.",
|
| 539 |
+
),
|
| 540 |
+
)
|
| 541 |
+
return TaskSpec(
|
| 542 |
+
task_id=task_id,
|
| 543 |
+
natural_language=instruction,
|
| 544 |
+
task_type="object_transfer",
|
| 545 |
+
required_rooms=["generated_room"],
|
| 546 |
+
entities=task_entities,
|
| 547 |
+
initial_predicates=[
|
| 548 |
+
PredicateSpec(name="supported_by", subject=movable, object=source_support)
|
| 549 |
+
],
|
| 550 |
+
goal_predicates=[
|
| 551 |
+
PredicateSpec(
|
| 552 |
+
name="supported_by",
|
| 553 |
+
subject=movable,
|
| 554 |
+
object=target_support,
|
| 555 |
+
hold_seconds=2.0,
|
| 556 |
+
),
|
| 557 |
+
PredicateSpec(name="released", subject=movable),
|
| 558 |
+
PredicateSpec(name="stable", subject=movable, hold_seconds=1.0),
|
| 559 |
+
PredicateSpec(name="robot_stable", subject="robot", hold_seconds=1.0),
|
| 560 |
+
],
|
| 561 |
+
safety_predicates=[PredicateSpec(name="no_safety_event", subject="robot")],
|
| 562 |
+
plan=plan,
|
| 563 |
+
random_seed=seed,
|
| 564 |
+
metadata={
|
| 565 |
+
"generator": "RoboHouseGen",
|
| 566 |
+
"source_task_id": task.task_id,
|
| 567 |
+
"source_task_type": task.task_type,
|
| 568 |
+
"description_en": task.description_en,
|
| 569 |
+
"description_zh": task.description_zh,
|
| 570 |
+
"route_waypoints_xy_m": task.route_waypoints_xy_m,
|
| 571 |
+
"route_length_m": task.route_length_m,
|
| 572 |
+
"pick": task.pick.model_dump(mode="json"),
|
| 573 |
+
"place": task.place.model_dump(mode="json"),
|
| 574 |
+
},
|
| 575 |
+
)
|
| 576 |
+
|
| 577 |
+
|
| 578 |
+
def _write_complete_checksums(root: Path) -> int:
|
| 579 |
+
checksum_path = root / "checksums.sha256"
|
| 580 |
+
checksum_path.unlink(missing_ok=True)
|
| 581 |
+
entries: list[str] = []
|
| 582 |
+
for path in sorted(root.rglob("*")):
|
| 583 |
+
if path.is_symlink():
|
| 584 |
+
raise ValueError(f"RPArena export contains a symlink: {path}")
|
| 585 |
+
if path.is_file():
|
| 586 |
+
relative = path.relative_to(root).as_posix()
|
| 587 |
+
entries.append(f"{_sha256(path)} {relative}")
|
| 588 |
+
atomic_write_text(checksum_path, "\n".join(entries) + "\n")
|
| 589 |
+
return len(entries)
|
| 590 |
+
|
| 591 |
+
|
| 592 |
+
def export_asset_first_rparena_bundle(
|
| 593 |
+
source_dir: str | Path,
|
| 594 |
+
output_dir: str | Path,
|
| 595 |
+
*,
|
| 596 |
+
blender_executable: str | Path,
|
| 597 |
+
usd_python: str | Path | None = None,
|
| 598 |
+
blender_export_script: str | Path | None = None,
|
| 599 |
+
robot_profile: str = "unitree_g1_43dof",
|
| 600 |
+
robot_base_height_m: float = 0.78,
|
| 601 |
+
manipulated_mass_kg: float = 0.25,
|
| 602 |
+
max_duration_s: float = 180.0,
|
| 603 |
+
seed: int = 0,
|
| 604 |
+
timeout_s: float = 900.0,
|
| 605 |
+
) -> RPArenaExportResult:
|
| 606 |
+
"""Export one certified asset-first task as a standard RPArena bundle."""
|
| 607 |
+
|
| 608 |
+
source = _source_directory(source_dir)
|
| 609 |
+
output = Path(output_dir).expanduser().resolve(strict=False)
|
| 610 |
+
if output.exists():
|
| 611 |
+
raise FileExistsError(f"output already exists: {output}")
|
| 612 |
+
output.parent.mkdir(parents=True, exist_ok=True)
|
| 613 |
+
height = _finite(robot_base_height_m, field="robot_base_height_m")
|
| 614 |
+
mass = _finite(manipulated_mass_kg, field="manipulated_mass_kg")
|
| 615 |
+
duration = _finite(max_duration_s, field="max_duration_s")
|
| 616 |
+
timeout = _finite(timeout_s, field="timeout_s")
|
| 617 |
+
if height <= 0.0 or mass <= 0.0 or duration <= 0.0 or timeout <= 0.0:
|
| 618 |
+
raise ValueError("robot height, mass, duration, and timeout must be positive")
|
| 619 |
+
if isinstance(seed, bool) or not isinstance(seed, int):
|
| 620 |
+
raise ValueError("seed must be an integer")
|
| 621 |
+
profile = _nonempty(robot_profile, field="robot_profile")
|
| 622 |
+
composition, source_task, entities, source_hashes, source_digest = _validate_source(source)
|
| 623 |
+
|
| 624 |
+
project_root = Path(__file__).resolve().parents[2]
|
| 625 |
+
export_script = blender_export_script or project_root / "scripts/blender_export_usd.py"
|
| 626 |
+
source_slug = _slug(source_task.task_id)
|
| 627 |
+
task_id = f"task-rhg-{source_slug}-v1"
|
| 628 |
+
scene_id = f"scene-rhg-{source_slug}-v1"
|
| 629 |
+
episode_id = f"episode-rhg-{source_slug}-{_slug(profile)}"
|
| 630 |
+
|
| 631 |
+
with tempfile.TemporaryDirectory(prefix=f".{output.name}.staging-", dir=output.parent) as temp:
|
| 632 |
+
staging = Path(temp) / "bundle"
|
| 633 |
+
scene_usd = staging / "scenesmith/scene.usdc"
|
| 634 |
+
export_evidence = _run_blender_export(
|
| 635 |
+
source,
|
| 636 |
+
scene_usd,
|
| 637 |
+
blender_executable=blender_executable,
|
| 638 |
+
blender_export_script=export_script,
|
| 639 |
+
timeout_s=timeout,
|
| 640 |
+
)
|
| 641 |
+
cleanup_layer = staging / "layers/asset_first_cleanup.usda"
|
| 642 |
+
usd_report = _run_usd_inspection(
|
| 643 |
+
scene_usd,
|
| 644 |
+
cleanup_layer,
|
| 645 |
+
[str(entity["entity_id"]) for entity in entities],
|
| 646 |
+
usd_python=usd_python,
|
| 647 |
+
timeout_s=timeout,
|
| 648 |
+
)
|
| 649 |
+
bindings = {str(key): str(value) for key, value in usd_report["entity_prim_paths"].items()}
|
| 650 |
+
scene_usd_sha256 = _sha256(scene_usd)
|
| 651 |
+
root_usd = staging / "root.usda"
|
| 652 |
+
atomic_write_text(
|
| 653 |
+
root_usd,
|
| 654 |
+
'#usda 1.0\n(\n defaultPrim = "World"\n metersPerUnit = 1\n'
|
| 655 |
+
' upAxis = "Z"\n subLayers = [\n'
|
| 656 |
+
' @layers/asset_first_cleanup.usda@,\n'
|
| 657 |
+
' @scenesmith/scene.usdc@\n ]\n)\n',
|
| 658 |
+
)
|
| 659 |
+
|
| 660 |
+
task = _task_spec(
|
| 661 |
+
source_task,
|
| 662 |
+
entities,
|
| 663 |
+
task_id=task_id,
|
| 664 |
+
seed=seed,
|
| 665 |
+
manipulated_mass_kg=mass,
|
| 666 |
+
)
|
| 667 |
+
content_hash = _canonical_sha256(
|
| 668 |
+
{
|
| 669 |
+
"entity_prim_paths": bindings,
|
| 670 |
+
"scene_usd_sha256": scene_usd_sha256,
|
| 671 |
+
"source_digest": source_digest,
|
| 672 |
+
"task_visual_roots_disabled": usd_report["task_visual_roots_disabled"],
|
| 673 |
+
}
|
| 674 |
+
)
|
| 675 |
+
scene = SceneManifest(
|
| 676 |
+
scene_id=scene_id,
|
| 677 |
+
task_id=task_id,
|
| 678 |
+
random_seed=seed,
|
| 679 |
+
layer_plan=SceneLayerPlan(
|
| 680 |
+
root_layer="root.usda",
|
| 681 |
+
layers={
|
| 682 |
+
"asset_first_cleanup": "layers/asset_first_cleanup.usda",
|
| 683 |
+
"scene": "scenesmith/scene.usdc",
|
| 684 |
+
},
|
| 685 |
+
),
|
| 686 |
+
entity_prim_paths=bindings,
|
| 687 |
+
robot_prim_path="/World/Robot",
|
| 688 |
+
source_checkpoints={
|
| 689 |
+
"adapter": ADAPTER_VERSION,
|
| 690 |
+
"generator": "RoboHouseGen",
|
| 691 |
+
"source_digest": source_digest,
|
| 692 |
+
},
|
| 693 |
+
content_hash=content_hash,
|
| 694 |
+
)
|
| 695 |
+
episode = BenchmarkPackager().package(
|
| 696 |
+
task,
|
| 697 |
+
scene,
|
| 698 |
+
profile,
|
| 699 |
+
staging,
|
| 700 |
+
episode_id=episode_id,
|
| 701 |
+
max_duration_s=duration,
|
| 702 |
+
split="test",
|
| 703 |
+
factor_values={
|
| 704 |
+
"source_task_id": source_task.task_id,
|
| 705 |
+
"source_digest": source_digest,
|
| 706 |
+
},
|
| 707 |
+
)
|
| 708 |
+
_write_json(staging / "manifests/scene.json", scene)
|
| 709 |
+
_write_json(
|
| 710 |
+
staging / "manifests/robot.json",
|
| 711 |
+
{
|
| 712 |
+
"schema_version": "1.0",
|
| 713 |
+
"translation_m": [
|
| 714 |
+
source_task.robot_start_pose.x_m,
|
| 715 |
+
source_task.robot_start_pose.y_m,
|
| 716 |
+
height,
|
| 717 |
+
],
|
| 718 |
+
"rotation_rpy_deg": [0.0, 0.0, source_task.robot_start_pose.yaw_deg],
|
| 719 |
+
},
|
| 720 |
+
)
|
| 721 |
+
|
| 722 |
+
provenance = staging / "provenance"
|
| 723 |
+
provenance.mkdir(parents=True, exist_ok=True)
|
| 724 |
+
shutil.copy2(source / "composition_manifest.json", provenance / "composition_manifest.json")
|
| 725 |
+
shutil.copy2(
|
| 726 |
+
source / "pick_move_place_task.json",
|
| 727 |
+
provenance / "pick_move_place_task.json",
|
| 728 |
+
)
|
| 729 |
+
metric_path = source / "metric_layout_spec.json"
|
| 730 |
+
if metric_path.is_file() and not metric_path.is_symlink():
|
| 731 |
+
shutil.copy2(metric_path, provenance / "metric_layout_spec.json")
|
| 732 |
+
texture_files = sorted(
|
| 733 |
+
path.relative_to(staging).as_posix()
|
| 734 |
+
for path in (scene_usd.parent / "textures").rglob("*")
|
| 735 |
+
if path.is_file() and not path.is_symlink()
|
| 736 |
+
) if (scene_usd.parent / "textures").is_dir() else []
|
| 737 |
+
export_report = {
|
| 738 |
+
"schema_version": "robothousegen.rparena-export/1.0",
|
| 739 |
+
"adapter": ADAPTER_VERSION,
|
| 740 |
+
"source_hashes": source_hashes,
|
| 741 |
+
"source_digest": source_digest,
|
| 742 |
+
"scene_usd_sha256": scene_usd_sha256,
|
| 743 |
+
"entity_prim_paths": bindings,
|
| 744 |
+
"entity_mesh_counts": usd_report["entity_mesh_counts"],
|
| 745 |
+
"task_visual_roots_disabled": usd_report["task_visual_roots_disabled"],
|
| 746 |
+
"source_default_prim": usd_report["source_default_prim"],
|
| 747 |
+
"copied_textures": texture_files,
|
| 748 |
+
"blender": export_evidence,
|
| 749 |
+
"assumptions": {
|
| 750 |
+
"robot_base_height_m": height,
|
| 751 |
+
"manipulated_mass_kg": mass,
|
| 752 |
+
"physics_authoring": "consumer",
|
| 753 |
+
"robot_embodiment": "consumer",
|
| 754 |
+
},
|
| 755 |
+
"room_dimensions_m": composition.get("room_dimensions_m"),
|
| 756 |
+
}
|
| 757 |
+
_write_json(provenance / "rparena_export.json", export_report)
|
| 758 |
+
|
| 759 |
+
interface = RPArenaInterfaceV1(
|
| 760 |
+
schema_version="rparena.generator-interface/1.0",
|
| 761 |
+
producer=RPArenaProducer(
|
| 762 |
+
name="RoboHouseGen",
|
| 763 |
+
version=API_COMPAT_VERSION,
|
| 764 |
+
adapter=ADAPTER_VERSION,
|
| 765 |
+
),
|
| 766 |
+
bundle=RPArenaBundlePaths(
|
| 767 |
+
root_usd="root.usda",
|
| 768 |
+
scene_usd="scenesmith/scene.usdc",
|
| 769 |
+
scene_manifest="manifests/scene.json",
|
| 770 |
+
task_manifest="manifests/task.json",
|
| 771 |
+
episode_manifest="manifests/episode.json",
|
| 772 |
+
evaluator_manifest="manifests/evaluator.json",
|
| 773 |
+
robot_manifest="manifests/robot.json",
|
| 774 |
+
),
|
| 775 |
+
contract=RPArenaContract(
|
| 776 |
+
bundle_type="single_episode",
|
| 777 |
+
task_type=task.task_type,
|
| 778 |
+
evaluator="predicate_graph_v1",
|
| 779 |
+
entity_binding="absolute_world_prim_paths",
|
| 780 |
+
physics_authoring="consumer",
|
| 781 |
+
robot_embodiment="consumer",
|
| 782 |
+
coordinate_system="usd_z_up_right_handed_metres",
|
| 783 |
+
checksums="sha256_complete",
|
| 784 |
+
),
|
| 785 |
+
identity=RPArenaIdentity(
|
| 786 |
+
scene_id=scene.scene_id,
|
| 787 |
+
task_id=task.task_id,
|
| 788 |
+
episode_id=episode.episode_id,
|
| 789 |
+
entity_ids=sorted(bindings),
|
| 790 |
+
manipulated_entity_ids=[source_task.movable_object_entity_id],
|
| 791 |
+
),
|
| 792 |
+
source=RPArenaSource(
|
| 793 |
+
kind="robothousegen.asset-first",
|
| 794 |
+
source_task_id=source_task.task_id,
|
| 795 |
+
source_digest=source_digest,
|
| 796 |
+
),
|
| 797 |
+
)
|
| 798 |
+
_write_json(staging / INTERFACE_MANIFEST, interface)
|
| 799 |
+
checksummed_file_count = _write_complete_checksums(staging)
|
| 800 |
+
staging.replace(output)
|
| 801 |
+
|
| 802 |
+
return RPArenaExportResult(
|
| 803 |
+
bundle_root=output,
|
| 804 |
+
interface_manifest=output / INTERFACE_MANIFEST,
|
| 805 |
+
scene_id=scene_id,
|
| 806 |
+
task_id=task_id,
|
| 807 |
+
episode_id=episode_id,
|
| 808 |
+
source_digest=source_digest,
|
| 809 |
+
scene_usd_sha256=scene_usd_sha256,
|
| 810 |
+
entity_prim_paths=bindings,
|
| 811 |
+
checksummed_file_count=checksummed_file_count,
|
| 812 |
+
)
|
| 813 |
+
|
| 814 |
+
|
| 815 |
+
__all__ = [
|
| 816 |
+
"ADAPTER_VERSION",
|
| 817 |
+
"EXPORT_RESULT_SCHEMA_VERSION",
|
| 818 |
+
"INTERFACE_MANIFEST",
|
| 819 |
+
"INTERFACE_SCHEMA_VERSION",
|
| 820 |
+
"RPArenaExportResult",
|
| 821 |
+
"RPArenaInterfaceV1",
|
| 822 |
+
"export_asset_first_rparena_bundle",
|
| 823 |
+
]
|
docs/reproduction/public_conversion_code/packages/adapters/rparena_baked.py
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""RHG-side final material conversion from the PMP20 channel bake receipt."""
|
| 2 |
+
import importlib.util,json,sys,math
|
| 3 |
+
from pathlib import Path
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
def verify_images(transfer,reference,texture_contract=None):
|
| 7 |
+
from .texture_metrics import compare, CONTRACT
|
| 8 |
+
contract_path=Path(texture_contract) if texture_contract is not None else CONTRACT
|
| 9 |
+
contract=json.loads(contract_path.read_text(encoding='utf-8'))
|
| 10 |
+
import numpy as np
|
| 11 |
+
from PIL import Image
|
| 12 |
+
receipt=json.loads((transfer/'bake-receipt.json').read_text());rows=[]
|
| 13 |
+
for frame in receipt['converted']:
|
| 14 |
+
name=frame['camera'].removeprefix('transfer_view_')
|
| 15 |
+
original=np.asarray(Image.open(reference/(name+'.png')).convert('RGB'),dtype=float)
|
| 16 |
+
converted=np.asarray(Image.open(transfer/frame['path']).convert('RGB'),dtype=float)
|
| 17 |
+
if original.shape!=converted.shape:raise ValueError('Source/baked camera image dimensions differ')
|
| 18 |
+
error=abs(original-converted)
|
| 19 |
+
clarity=(compare(reference/(name+'.png'),transfer/frame['path'],name,contract)
|
| 20 |
+
if name in contract['regions'] and original.shape[:2]==(720,960)
|
| 21 |
+
else dict(clarity_passed=False,available=False,reason='No frozen ROI for this camera/resolution'))
|
| 22 |
+
rows.append(dict(view=name,mae=float(error.mean()),p95=float(np.percentile(error,95)),clarity=clarity))
|
| 23 |
+
mean_passed=len(rows)==len(receipt['views']) and all(r['mae']<=5. for r in rows)
|
| 24 |
+
clarity_passed=bool(rows) and all(r['clarity']['clarity_passed'] for r in rows)
|
| 25 |
+
return dict(passed=mean_passed and clarity_passed,mean_error_passed=mean_passed,
|
| 26 |
+
threshold_mae=5.,threshold_source='PMP20 source conversion contract',
|
| 27 |
+
registration_or_exposure_fitting=False,views=rows,
|
| 28 |
+
clarity_passed=clarity_passed,texture_contract=contract)
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
def apply_baked(stage,transfer,output,shared):
|
| 32 |
+
from pxr import Gf,Sdf,UsdGeom,UsdShade,Tf
|
| 33 |
+
from .rparena_v16 import intern,sha
|
| 34 |
+
worker=Path(__file__).resolve().parents[2]/'scripts/source_transfer'
|
| 35 |
+
sys.path.insert(0,str(worker))
|
| 36 |
+
from usd_scene_transfer_worker import MDL_SCALARS,MDL_COLORS,MDL_MAPS
|
| 37 |
+
receipt=json.loads((transfer/'bake-receipt.json').read_text());records={r['usd_material_name']:r for r in receipt['materials']}
|
| 38 |
+
if 'texture_budget' in receipt:
|
| 39 |
+
budget=receipt['texture_budget']
|
| 40 |
+
if budget['estimated_resident_bytes']>budget['budget_bytes']:raise ValueError('Scene texture budget exceeded')
|
| 41 |
+
(output/'texture-budget.json').write_text(json.dumps(budget,indent=2))
|
| 42 |
+
spec=importlib.util.find_spec('isaacsim');base=Path(spec.origin).parent
|
| 43 |
+
mdl=base/'kit/mdl/core/Base/OmniSurface.mdl'
|
| 44 |
+
if not mdl.is_file():raise FileNotFoundError(mdl)
|
| 45 |
+
changes=[];ray_changes=[]
|
| 46 |
+
rays=json.loads((output/'source-ray-visibility.json').read_text())['objects']
|
| 47 |
+
ray_lookup=dict(rays)
|
| 48 |
+
for name,value in rays.items():
|
| 49 |
+
key=Tf.MakeValidIdentifier(name)
|
| 50 |
+
if key in ray_lookup and ray_lookup[key]!=value:raise ValueError('Ambiguous sanitized source visibility name')
|
| 51 |
+
ray_lookup[key]=value
|
| 52 |
+
for name,values in rays.items():
|
| 53 |
+
if not values['hide_render'] and any(not values[k] for k in ['visible_camera','visible_diffuse','visible_glossy','visible_transmission','visible_volume_scatter']):
|
| 54 |
+
raise ValueError('Unsupported non-shadow source ray visibility: '+name)
|
| 55 |
+
for p in stage.Traverse():
|
| 56 |
+
if p.IsA(UsdGeom.Mesh):
|
| 57 |
+
q=p;names=[];settings=None
|
| 58 |
+
while q:
|
| 59 |
+
names=[q.GetName(),str(q.GetMetadata('displayName')),*[str(a.Get()) for a in q.GetAttributes() if a.GetName().endswith('object_name')]]
|
| 60 |
+
settings=next((ray_lookup[n] for n in names if n in ray_lookup),None)
|
| 61 |
+
if settings is not None:break
|
| 62 |
+
q=q.GetParent()
|
| 63 |
+
if settings is None:raise ValueError('Mesh has no source ray-visibility owner: '+str(p.GetPath()))
|
| 64 |
+
p.CreateAttribute('primvars:doNotCastShadows',Sdf.ValueTypeNames.Bool).Set(not settings['visible_shadow'])
|
| 65 |
+
if settings['hide_render']:UsdGeom.Imageable(p).CreateVisibilityAttr('invisible')
|
| 66 |
+
if not settings['visible_shadow']:ray_changes.append(str(p.GetPath()))
|
| 67 |
+
if p.GetName() in receipt['hidden_source_objects']:
|
| 68 |
+
UsdGeom.Imageable(p).CreateVisibilityAttr('invisible')
|
| 69 |
+
if p.IsA(UsdShade.Shader):
|
| 70 |
+
sh=UsdShade.Shader(p);ior=sh.GetInput('ior')
|
| 71 |
+
if sh.GetIdAttr().Get()=='UsdPreviewSurface' and ior and ior.Get() is not None and ior.Get()<1.:
|
| 72 |
+
changes.append(dict(shader=str(p.GetPath()),source_ior=ior.Get(),ior=1.5,policy='PMP20_explicit_compatibility'))
|
| 73 |
+
ior.Set(1.5)
|
| 74 |
+
mdl_count=0;specular_mappings=[]
|
| 75 |
+
for p in list(stage.Traverse()):
|
| 76 |
+
if not p.IsA(UsdShade.Material) or p.GetName() not in records:continue
|
| 77 |
+
r=records[p.GetName()]
|
| 78 |
+
c=dict(r['constants']);level=float(c.get('Specular IOR Level',.5));source_ior=float(c.get('IOR',1.5))
|
| 79 |
+
opaque=c.get('Transmission Weight',0.)==0. and 'transmission' not in r['maps']
|
| 80 |
+
effective_ior=None
|
| 81 |
+
if opaque and 'specular_weight' not in r['maps'] and abs(level-.5)>1e-6:
|
| 82 |
+
# Cycles Principled adjusts dielectric F0, then converts back to
|
| 83 |
+
# reflection IOR. A nonstandard PreviewSurface "specular" input
|
| 84 |
+
# cannot preserve this value. Refraction is excluded from this path.
|
| 85 |
+
f0=((source_ior-1.)/(source_ior+1.))**2*2.*max(level,0.)
|
| 86 |
+
if not 0<=f0<1:raise ValueError('Unsupported source dielectric F0')
|
| 87 |
+
root=math.sqrt(f0);effective_ior=(1.+root)/(1.-root)
|
| 88 |
+
needs_separate_coat=effective_ior is not None and c.get('Coat Weight',0.)>0.
|
| 89 |
+
if r['target_shader']!='OmniSurface' and not needs_separate_coat:
|
| 90 |
+
if effective_ior is not None:
|
| 91 |
+
from pxr import Usd
|
| 92 |
+
shaders=[UsdShade.Shader(q) for q in Usd.PrimRange(p) if q.IsA(UsdShade.Shader) and UsdShade.Shader(q).GetIdAttr().Get()=='UsdPreviewSurface']
|
| 93 |
+
if len(shaders)!=1:raise ValueError('Ambiguous PreviewSurface source')
|
| 94 |
+
shaders[0].CreateInput('ior',Sdf.ValueTypeNames.Float).Set(effective_ior)
|
| 95 |
+
specular_mappings.append(dict(material=str(p.GetPath()),source_ior=source_ior,source_level=level,reflection_ior=effective_ior,shader='UsdPreviewSurface'))
|
| 96 |
+
continue
|
| 97 |
+
if needs_separate_coat and r['target_shader']!='OmniSurface':
|
| 98 |
+
from scene_transfer import CHANNELS
|
| 99 |
+
if any(channel not in r['maps'] and name not in c for channel,name in CHANNELS.items()):
|
| 100 |
+
raise ValueError('Separate coat/base IOR requires complete source channel data: '+r['source_material'])
|
| 101 |
+
m=UsdShade.Material(p);sh=UsdShade.Shader.Define(stage,str(p.GetPath())+'/RHGSourceSurface')
|
| 102 |
+
sh.CreateImplementationSourceAttr(UsdShade.Tokens.sourceAsset);sh.SetSourceAsset(Sdf.AssetPath(str(mdl)),'mdl');sh.SetSourceAssetSubIdentifier('OmniSurface','mdl');sh.CreateOutput('out',Sdf.ValueTypeNames.Token)
|
| 103 |
+
sh.CreateInput('diffuse_reflection_weight',Sdf.ValueTypeNames.Float).Set(1.);sh.CreateInput('enable_specular_transmission',Sdf.ValueTypeNames.Bool).Set(bool(c.get('Transmission Weight',0)>0 or 'transmission' in r['maps']));sh.CreateInput('specular_reflection_weight',Sdf.ValueTypeNames.Float).Set(1. if effective_ior is not None else min(1.,2.*level));sh.CreateInput('thin_walled',Sdf.ValueTypeNames.Bool).Set(False)
|
| 104 |
+
for src,dest in MDL_SCALARS.items():
|
| 105 |
+
if src in c:
|
| 106 |
+
v=float(c[src]);v=1.5 if src in ('IOR','Coat IOR') and v<1 else v
|
| 107 |
+
sh.CreateInput(dest,Sdf.ValueTypeNames.Float).Set(v)
|
| 108 |
+
for src,dest in MDL_COLORS.items():
|
| 109 |
+
if src in c:sh.CreateInput(dest,Sdf.ValueTypeNames.Color3f).Set(Gf.Vec3f(*c[src][:3]))
|
| 110 |
+
if effective_ior is not None:
|
| 111 |
+
sh.GetInput('specular_reflection_ior').Set(effective_ior)
|
| 112 |
+
specular_mappings.append(dict(material=str(p.GetPath()),source_ior=source_ior,source_level=level,reflection_ior=effective_ior,shader='OmniSurface',coat_ior=c.get('Coat IOR')))
|
| 113 |
+
if c.get('Emission Strength',0)>0 or 'emission_strength' in r['maps']:sh.CreateInput('emission_weight',Sdf.ValueTypeNames.Float).Set(1.)
|
| 114 |
+
for ch,image in r['maps'].items():
|
| 115 |
+
f=transfer/image.get('native_path',image['path']);name=sha(f)+f.suffix.lower();intern(f,output/'assets'/name,shared/name)
|
| 116 |
+
sh.CreateInput(MDL_MAPS[ch],Sdf.ValueTypeNames.Asset).Set(Sdf.AssetPath('assets/'+name));sh.GetInput(MDL_MAPS[ch]).GetAttr().SetColorSpace('sRGB' if image['color_space']=='sRGB' else 'raw')
|
| 117 |
+
m.CreateSurfaceOutput('mdl').ConnectToSource(sh.ConnectableAPI(),'out');m.CreateVolumeOutput('mdl').ConnectToSource(sh.ConnectableAPI(),'out');mdl_count+=1
|
| 118 |
+
return dict(source_bake_sha256=sha(transfer/'bake-receipt.json'),mdl_materials=mdl_count,ior_compatibility=changes,specular_ior_mappings=specular_mappings,source_no_shadow_meshes=ray_changes,runtime_dependencies={'OmniSurface.mdl':dict(path=str(mdl),sha256=sha(mdl))})
|
docs/reproduction/public_conversion_code/packages/adapters/rparena_native.py
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Carry verified source articulation graphs into the delivered house."""
|
| 2 |
+
import json
|
| 3 |
+
from pathlib import Path
|
| 4 |
+
import sys
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
def transfer_baked_surface(source_stage,native_stage,source_root,native_root):
|
| 8 |
+
"""Copy baked material/UVs by verified world-space face correspondence.
|
| 9 |
+
|
| 10 |
+
Native points, topology, rigid bodies and collisions remain untouched.
|
| 11 |
+
A failed or ambiguous correspondence is an export failure, not a fallback.
|
| 12 |
+
"""
|
| 13 |
+
import numpy as np
|
| 14 |
+
from scipy.spatial import cKDTree
|
| 15 |
+
from pxr import Gf,Sdf,Usd,UsdGeom,UsdShade,UsdPhysics,Vt
|
| 16 |
+
source_cache=UsdGeom.XformCache();native_cache=UsdGeom.XformCache()
|
| 17 |
+
def points(stage_cache,p):
|
| 18 |
+
xf=stage_cache.GetLocalToWorldTransform(p)
|
| 19 |
+
return np.array([list(xf.Transform(Gf.Vec3d(v))) for v in UsdGeom.Mesh(p).GetPointsAttr().Get()])
|
| 20 |
+
candidates=[]
|
| 21 |
+
for p in Usd.PrimRange(source_stage.GetPrimAtPath(source_root)):
|
| 22 |
+
if p.IsA(UsdGeom.Mesh):
|
| 23 |
+
xyz=points(source_cache,p)
|
| 24 |
+
if len(xyz):candidates.append((p,xyz,xyz.min(0),xyz.max(0)))
|
| 25 |
+
records=[]
|
| 26 |
+
for p in Usd.PrimRange(native_stage.GetPrimAtPath(native_root)):
|
| 27 |
+
if not p.IsA(UsdGeom.Mesh) or UsdGeom.Imageable(p).ComputePurpose()=='guide':continue
|
| 28 |
+
xyz=points(native_cache,p);matches=[]
|
| 29 |
+
if not len(xyz):continue
|
| 30 |
+
for q,coords,lo,hi in candidates:
|
| 31 |
+
if max(abs(xyz.min(0)-lo).max(),abs(xyz.max(0)-hi).max())>.001:continue
|
| 32 |
+
distance,ids=cKDTree(coords).query(xyz)
|
| 33 |
+
reverse=cKDTree(xyz).query(coords)[0]
|
| 34 |
+
error=max(float(distance.max()),float(reverse.max()))
|
| 35 |
+
if error<=.001:matches.append((q,ids,error))
|
| 36 |
+
if len(matches)!=1:raise ValueError('Baked/native visual correspondence is not unique: '+str(p.GetPath())+' '+str(len(matches)))
|
| 37 |
+
q,ids,error=matches[0];sm=UsdGeom.Mesh(q);nm=UsdGeom.Mesh(p)
|
| 38 |
+
shadow=q.GetAttribute('primvars:doNotCastShadows')
|
| 39 |
+
if shadow and shadow.Get() is not None:p.CreateAttribute('primvars:doNotCastShadows',Sdf.ValueTypeNames.Bool).Set(shadow.Get())
|
| 40 |
+
UsdGeom.Imageable(p).CreateVisibilityAttr(UsdGeom.Imageable(q).ComputeVisibility())
|
| 41 |
+
physics_material=UsdShade.MaterialBindingAPI(p).ComputeBoundMaterial('physics')[0]
|
| 42 |
+
if physics_material and physics_material.GetPrim().HasAPI(UsdPhysics.MaterialAPI):
|
| 43 |
+
p.CreateRelationship('material:binding:physics').SetTargets([physics_material.GetPath()])
|
| 44 |
+
coords=points(source_cache,q);tree=cKDTree(coords)
|
| 45 |
+
canonical={i:min(tree.query_ball_point(v,1e-5)) for i,v in enumerate(coords)}
|
| 46 |
+
ids=np.asarray([canonical[int(i)] for i in ids])
|
| 47 |
+
src_idx=list(sm.GetFaceVertexIndicesAttr().Get());src_counts=list(sm.GetFaceVertexCountsAttr().Get())
|
| 48 |
+
faces=[];offset=0;by_vertex={}
|
| 49 |
+
for face,count in enumerate(src_counts):
|
| 50 |
+
corners=list(range(offset,offset+count));verts={canonical[src_idx[k]] for k in corners};faces.append((verts,corners))
|
| 51 |
+
for v in verts:by_vertex.setdefault(v,[]).append(face)
|
| 52 |
+
offset+=count
|
| 53 |
+
dst_idx=list(nm.GetFaceVertexIndicesAttr().Get());dst_counts=list(nm.GetFaceVertexCountsAttr().Get());corner_map=[];face_map=[];offset=0
|
| 54 |
+
for count in dst_counts:
|
| 55 |
+
mapped=[int(ids[v]) for v in dst_idx[offset:offset+count]];members=set(mapped)
|
| 56 |
+
selected=sorted({f for v in members for f in by_vertex.get(v,[]) if faces[f][0].issubset(members)})
|
| 57 |
+
if not selected:raise ValueError('Native face has no baked source correspondence')
|
| 58 |
+
for v in mapped:
|
| 59 |
+
choices=[k for f in selected for k in faces[f][1] if canonical[src_idx[k]]==v]
|
| 60 |
+
if not choices:raise ValueError('Native UV corner has no source correspondence')
|
| 61 |
+
corner_map.append(choices[0])
|
| 62 |
+
face_map.append(selected);offset+=count
|
| 63 |
+
uv_names=[]
|
| 64 |
+
for uv in UsdGeom.PrimvarsAPI(q).GetPrimvars():
|
| 65 |
+
if uv.GetTypeName() not in (Sdf.ValueTypeNames.TexCoord2fArray,Sdf.ValueTypeNames.Float2Array):continue
|
| 66 |
+
values=uv.ComputeFlattened()
|
| 67 |
+
if values is None:continue
|
| 68 |
+
interpolation=uv.GetInterpolation()
|
| 69 |
+
if interpolation=='faceVarying':mapped=[values[k] for k in corner_map]
|
| 70 |
+
elif interpolation in ('vertex','varying'):mapped=[values[src_idx[k]] for k in corner_map]
|
| 71 |
+
else:raise ValueError('Unsupported baked UV interpolation: '+str(interpolation))
|
| 72 |
+
target=UsdGeom.PrimvarsAPI(p).CreatePrimvar(uv.GetPrimvarName(),uv.GetTypeName(),'faceVarying');target.Set(Vt.Vec2fArray(mapped));target.GetIndicesAttr().Clear();uv_names.append(uv.GetPrimvarName())
|
| 73 |
+
base=UsdShade.MaterialBindingAPI(q).ComputeBoundMaterial()[0]
|
| 74 |
+
source_materials=[str(base.GetPath()) if base else None]*len(faces)
|
| 75 |
+
for subset in UsdGeom.Subset.GetAllGeomSubsets(sm):
|
| 76 |
+
material=UsdShade.MaterialBindingAPI(subset.GetPrim()).ComputeBoundMaterial()[0]
|
| 77 |
+
if material:
|
| 78 |
+
for index in subset.GetIndicesAttr().Get():source_materials[index]=str(material.GetPath())
|
| 79 |
+
physical_faces=[str(physics_material.GetPath()) if physics_material and physics_material.GetPrim().HasAPI(UsdPhysics.MaterialAPI) else None]*len(dst_counts)
|
| 80 |
+
for subset in UsdGeom.Subset.GetAllGeomSubsets(nm):
|
| 81 |
+
bound=UsdShade.MaterialBindingAPI(subset.GetPrim()).ComputeBoundMaterial('physics')[0]
|
| 82 |
+
if bound and bound.GetPrim().HasAPI(UsdPhysics.MaterialAPI):
|
| 83 |
+
for face in subset.GetIndicesAttr().Get():physical_faces[face]=str(bound.GetPath())
|
| 84 |
+
groups={}
|
| 85 |
+
for index,selected in enumerate(face_map):
|
| 86 |
+
materials={source_materials[f] for f in selected}
|
| 87 |
+
if len(materials)!=1 or None in materials:raise ValueError('Ambiguous baked face material')
|
| 88 |
+
groups.setdefault((next(iter(materials)),physical_faces[index]),[]).append(index)
|
| 89 |
+
# Block inherited source bindings/subsets when installing the baked skin.
|
| 90 |
+
for subset in UsdGeom.Subset.GetAllGeomSubsets(nm):subset.GetPrim().SetActive(False)
|
| 91 |
+
for i,((material,physical),indices) in enumerate(sorted(groups.items(),key=lambda item:str(item[0]))):
|
| 92 |
+
if len(groups)==1:target=p
|
| 93 |
+
else:
|
| 94 |
+
subset=UsdGeom.Subset.Define(native_stage,str(p.GetPath())+'/RHGBaked_'+str(i));subset.CreateElementTypeAttr('face');subset.CreateFamilyNameAttr('materialBind');subset.CreateIndicesAttr(indices);target=subset.GetPrim()
|
| 95 |
+
UsdShade.MaterialBindingAPI.Apply(target);target.CreateRelationship('material:binding').SetTargets([Sdf.Path(material)])
|
| 96 |
+
if physical:target.CreateRelationship('material:binding:physics').SetTargets([Sdf.Path(physical)])
|
| 97 |
+
records.append(dict(native_mesh=str(p.GetPath()),baked_mesh=str(q.GetPath()),world_geometry_error_m=error,uv_names=uv_names,materials=sorted({v[0] for v in groups}),physical_materials_preserved=sorted({v[1] for v in groups if v[1]}),native_geometry_modified=False))
|
| 98 |
+
return records
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
def author_native(stage, source, output, paths, shared):
|
| 102 |
+
from pxr import Sdf, Usd, UsdGeom, UsdPhysics
|
| 103 |
+
from .rparena_v16 import material_assets, sha
|
| 104 |
+
helpers=Path(__file__).resolve().parents[2]/'scripts/internal/scene_generation/real_assets'
|
| 105 |
+
sys.path.insert(0,str(helpers))
|
| 106 |
+
from native_scene_contract import validate
|
| 107 |
+
check=validate(source)
|
| 108 |
+
if not check['passed']:
|
| 109 |
+
raise ValueError('Source native articulation gate is incomplete: '+str(check))
|
| 110 |
+
receipt=json.loads((source/'native_articulation_verification.json').read_text())
|
| 111 |
+
bindings=receipt.get('bindings',[])
|
| 112 |
+
if not bindings:
|
| 113 |
+
return dict(source_receipt_sha256=sha(source/'native_articulation_verification.json'),
|
| 114 |
+
instances=[],body_paths=[],joint_count=0)
|
| 115 |
+
original=Usd.Stage.Open(str(source/receipt['active_runtime']))
|
| 116 |
+
flat=original.Flatten()
|
| 117 |
+
layer=Sdf.Layer.CreateNew(str(output/'native.usdc'))
|
| 118 |
+
native=Usd.Stage.Open(layer)
|
| 119 |
+
world=UsdGeom.Xform.Define(native,'/World').GetPrim();native.SetDefaultPrim(world)
|
| 120 |
+
if not Sdf.CopySpec(flat,'/World/Native',layer,'/World/Native'):
|
| 121 |
+
raise ValueError('Missing verified /World/Native subtree')
|
| 122 |
+
layer.Save()
|
| 123 |
+
textures=material_assets(native,output/'native.usdc',output,shared)
|
| 124 |
+
records=[];bodies=[];joints=[]
|
| 125 |
+
for binding in bindings:
|
| 126 |
+
entity=binding['entity_id'];path=binding['instance']
|
| 127 |
+
prim=native.GetPrimAtPath(path)
|
| 128 |
+
if not prim:raise ValueError('Missing native instance: '+entity)
|
| 129 |
+
movable=[p for p in Usd.PrimRange(prim) if p.IsA(UsdPhysics.Joint)
|
| 130 |
+
and not p.IsA(UsdPhysics.FixedJoint) and UsdPhysics.Joint(p).GetJointEnabledAttr().Get()]
|
| 131 |
+
if len(movable)!=binding['movable_joint_count']:
|
| 132 |
+
raise ValueError('Native joint denominator changed: '+entity)
|
| 133 |
+
old=paths[entity]
|
| 134 |
+
surfaces=transfer_baked_surface(stage,native,old,path) if (output/'baked-material-delivery.json').exists() else []
|
| 135 |
+
native.OverridePrim(old).SetActive(False)
|
| 136 |
+
paths[entity]=path
|
| 137 |
+
owned=[str(p.GetPath()) for p in Usd.PrimRange(prim) if p.HasAPI(UsdPhysics.RigidBodyAPI)]
|
| 138 |
+
bodies.extend(owned);joints.extend(str(p.GetPath()) for p in movable)
|
| 139 |
+
records.append(dict(entity_id=entity,instance=path,disabled_static_prim=old,
|
| 140 |
+
movable_joint_count=len(movable),body_paths=owned,
|
| 141 |
+
source_sha256=binding['source_sha256']))
|
| 142 |
+
records[-1]['baked_surface_transfer']=surfaces
|
| 143 |
+
if len(joints)!=receipt['native_joint_denominator']:
|
| 144 |
+
raise ValueError('Native joint total changed')
|
| 145 |
+
layer.Save()
|
| 146 |
+
stage.GetRootLayer().subLayerPaths.insert(0,'native.usdc')
|
| 147 |
+
return dict(source_receipt_sha256=sha(source/'native_articulation_verification.json'),
|
| 148 |
+
source_runtime_sha256=sha(source/receipt['active_runtime']),instances=records,
|
| 149 |
+
body_paths=bodies,joint_paths=joints,joint_count=len(joints),texture_assets=textures,
|
| 150 |
+
validation_scope='source_gate_preserved; delivered_stage_requires_physical_validation')
|
docs/reproduction/public_conversion_code/packages/adapters/rparena_usd_worker.py
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""OpenUSD-only worker used by the RoboHouseGen RPArena exporter."""
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
import argparse
|
| 6 |
+
import json
|
| 7 |
+
from pathlib import Path
|
| 8 |
+
from typing import Any
|
| 9 |
+
|
| 10 |
+
_SCENE_ANCHOR = "/World/SceneSmith"
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
def _request(path: Path) -> dict[str, Any]:
|
| 14 |
+
value = json.loads(path.read_text(encoding="utf-8"))
|
| 15 |
+
if not isinstance(value, dict):
|
| 16 |
+
raise ValueError("RPArena USD worker request must be an object")
|
| 17 |
+
if set(value) != {"cleanup_layer", "entity_ids", "scene_usd"}:
|
| 18 |
+
raise ValueError("RPArena USD worker request fields are incomplete")
|
| 19 |
+
if not isinstance(value["entity_ids"], list) or not value["entity_ids"]:
|
| 20 |
+
raise ValueError("RPArena USD worker entity_ids must be a non-empty list")
|
| 21 |
+
return value
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
def inspect_scene(request: dict[str, Any]) -> dict[str, Any]:
|
| 25 |
+
from pxr import Sdf, Usd, UsdGeom # type: ignore[import-not-found]
|
| 26 |
+
|
| 27 |
+
scene_usd_input = Path(str(request["scene_usd"]))
|
| 28 |
+
cleanup_layer = Path(str(request["cleanup_layer"])).resolve(strict=False)
|
| 29 |
+
if scene_usd_input.is_symlink():
|
| 30 |
+
raise ValueError("RPArena exported scene must be a non-symlink regular file")
|
| 31 |
+
scene_usd = scene_usd_input.resolve(strict=True)
|
| 32 |
+
if not scene_usd.is_file():
|
| 33 |
+
raise ValueError("RPArena exported scene must be a non-symlink regular file")
|
| 34 |
+
if cleanup_layer.exists():
|
| 35 |
+
raise FileExistsError(f"cleanup layer already exists: {cleanup_layer}")
|
| 36 |
+
entity_ids = [str(value).strip() for value in request["entity_ids"]]
|
| 37 |
+
if any(not value for value in entity_ids) or entity_ids != sorted(set(entity_ids)):
|
| 38 |
+
raise ValueError("RPArena USD worker entity_ids must be sorted and unique")
|
| 39 |
+
|
| 40 |
+
stage = Usd.Stage.Open(str(scene_usd))
|
| 41 |
+
if stage is None:
|
| 42 |
+
raise RuntimeError(f"OpenUSD could not open exported scene: {scene_usd}")
|
| 43 |
+
anchor = Sdf.Path(_SCENE_ANCHOR)
|
| 44 |
+
anchor_prim = stage.GetPrimAtPath(anchor)
|
| 45 |
+
if not anchor_prim or not anchor_prim.IsValid():
|
| 46 |
+
raise ValueError(f"exported scene lacks {_SCENE_ANCHOR}")
|
| 47 |
+
|
| 48 |
+
bindings: dict[str, str] = {}
|
| 49 |
+
mesh_counts: dict[str, int] = {}
|
| 50 |
+
traversed = list(stage.Traverse())
|
| 51 |
+
for entity_id in entity_ids:
|
| 52 |
+
token = f"entity__{entity_id}__"
|
| 53 |
+
roots: set[str] = set()
|
| 54 |
+
for prim in traversed:
|
| 55 |
+
if token not in str(prim.GetPath()):
|
| 56 |
+
continue
|
| 57 |
+
current = prim.GetPath()
|
| 58 |
+
while current != Sdf.Path.absoluteRootPath and current.GetParentPath() != anchor:
|
| 59 |
+
current = current.GetParentPath()
|
| 60 |
+
if current.GetParentPath() == anchor:
|
| 61 |
+
roots.add(str(current))
|
| 62 |
+
if len(roots) != 1:
|
| 63 |
+
raise ValueError(
|
| 64 |
+
f"entity {entity_id!r} must bind to exactly one top-level USD root; "
|
| 65 |
+
f"found {sorted(roots)}"
|
| 66 |
+
)
|
| 67 |
+
root = next(iter(roots))
|
| 68 |
+
root_prim = stage.GetPrimAtPath(root)
|
| 69 |
+
mesh_count = sum(
|
| 70 |
+
1 for descendant in Usd.PrimRange(root_prim) if descendant.IsA(UsdGeom.Mesh)
|
| 71 |
+
)
|
| 72 |
+
if mesh_count < 1:
|
| 73 |
+
raise ValueError(f"entity {entity_id!r} USD root has no mesh descendants")
|
| 74 |
+
bindings[entity_id] = root
|
| 75 |
+
mesh_counts[entity_id] = mesh_count
|
| 76 |
+
if len(set(bindings.values())) != len(bindings):
|
| 77 |
+
raise ValueError("multiple semantic entities bind to the same USD root")
|
| 78 |
+
|
| 79 |
+
task_visual_roots = sorted(
|
| 80 |
+
str(child.GetPath())
|
| 81 |
+
for child in anchor_prim.GetChildren()
|
| 82 |
+
if child.GetName().startswith("task_")
|
| 83 |
+
)
|
| 84 |
+
cleanup_layer.parent.mkdir(parents=True, exist_ok=True)
|
| 85 |
+
layer = Sdf.Layer.CreateNew(str(cleanup_layer))
|
| 86 |
+
if layer is None:
|
| 87 |
+
raise RuntimeError(f"could not create cleanup layer: {cleanup_layer}")
|
| 88 |
+
for prim_path in task_visual_roots:
|
| 89 |
+
spec = Sdf.CreatePrimInLayer(layer, prim_path)
|
| 90 |
+
spec.specifier = Sdf.SpecifierOver
|
| 91 |
+
spec.active = False
|
| 92 |
+
layer.Save()
|
| 93 |
+
|
| 94 |
+
default_prim = stage.GetDefaultPrim()
|
| 95 |
+
return {
|
| 96 |
+
"schema_version": "robothousegen.rparena-usd-inspection/1.0",
|
| 97 |
+
"scene_anchor": _SCENE_ANCHOR,
|
| 98 |
+
"source_default_prim": str(default_prim.GetPath()) if default_prim else None,
|
| 99 |
+
"entity_prim_paths": bindings,
|
| 100 |
+
"entity_mesh_counts": mesh_counts,
|
| 101 |
+
"task_visual_roots_disabled": task_visual_roots,
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
def main() -> int:
|
| 106 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 107 |
+
parser.add_argument("--request", type=Path, required=True)
|
| 108 |
+
args = parser.parse_args()
|
| 109 |
+
print(json.dumps(inspect_scene(_request(args.request)), sort_keys=True))
|
| 110 |
+
return 0
|
| 111 |
+
|
| 112 |
+
|
| 113 |
+
if __name__ == "__main__":
|
| 114 |
+
raise SystemExit(main())
|
docs/reproduction/public_conversion_code/packages/adapters/rparena_v16.py
ADDED
|
@@ -0,0 +1,945 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Export v16 scenes without changing the retired asset-first adapter."""
|
| 2 |
+
from __future__ import annotations
|
| 3 |
+
|
| 4 |
+
import argparse
|
| 5 |
+
from contextlib import contextmanager
|
| 6 |
+
import hashlib
|
| 7 |
+
import json
|
| 8 |
+
import math
|
| 9 |
+
import os
|
| 10 |
+
from pathlib import Path
|
| 11 |
+
import resource
|
| 12 |
+
import re
|
| 13 |
+
import shutil
|
| 14 |
+
import subprocess
|
| 15 |
+
import time
|
| 16 |
+
import traceback
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
def read(path):
|
| 20 |
+
return json.loads(Path(path).read_text(encoding='utf-8'))
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
def write(path, value):
|
| 24 |
+
path = Path(path)
|
| 25 |
+
path.parent.mkdir(parents=True, exist_ok=True)
|
| 26 |
+
temporary = path.with_suffix(path.suffix + '.tmp')
|
| 27 |
+
temporary.write_text(json.dumps(value, indent=2, ensure_ascii=False) + '\n', encoding='utf-8')
|
| 28 |
+
temporary.replace(path)
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
def sha(path):
|
| 32 |
+
digest = hashlib.sha256()
|
| 33 |
+
with Path(path).open('rb') as stream:
|
| 34 |
+
for chunk in iter(lambda: stream.read(4 * 1024 * 1024), b''):
|
| 35 |
+
digest.update(chunk)
|
| 36 |
+
return digest.hexdigest()
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
@contextmanager
|
| 40 |
+
def timed(records, name, output):
|
| 41 |
+
started = time.time()
|
| 42 |
+
row = dict(stage=name, started_at=started, status='running', gpu_s=None,
|
| 43 |
+
gpu_accounting='未采样;不以 wall time 冒充 GPU·s')
|
| 44 |
+
records.append(row)
|
| 45 |
+
write(output / 'timing.json', records)
|
| 46 |
+
try:
|
| 47 |
+
yield row
|
| 48 |
+
row['status'] = 'completed'
|
| 49 |
+
except Exception as error:
|
| 50 |
+
row.update(status='failed', error=str(error), traceback=traceback.format_exc())
|
| 51 |
+
raise
|
| 52 |
+
finally:
|
| 53 |
+
row.update(wall_s=time.time() - started,
|
| 54 |
+
process_peak_rss_bytes=resource.getrusage(resource.RUSAGE_SELF).ru_maxrss * 1024,
|
| 55 |
+
children_peak_rss_bytes=resource.getrusage(resource.RUSAGE_CHILDREN).ru_maxrss * 1024,
|
| 56 |
+
output_bytes=sum(path.stat().st_size for path in output.rglob('*') if path.is_file()))
|
| 57 |
+
write(output / 'timing.json', records)
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
def material_assets(stage, source, package, shared):
|
| 61 |
+
from pxr import Sdf, UsdUtils
|
| 62 |
+
layers, assets, unresolved = UsdUtils.ComputeAllDependencies(str(source))
|
| 63 |
+
if unresolved:
|
| 64 |
+
raise ValueError('USD 引用未解析:' + str(unresolved))
|
| 65 |
+
if len(layers) != 1:
|
| 66 |
+
raise ValueError('视觉入口含多层 USD;须先明确各层变换和引用,禁止静默 flatten')
|
| 67 |
+
copied = []
|
| 68 |
+
for prim in stage.Traverse():
|
| 69 |
+
for attribute in prim.GetAttributes():
|
| 70 |
+
if attribute.GetTypeName() not in (Sdf.ValueTypeNames.Asset, Sdf.ValueTypeNames.AssetArray):
|
| 71 |
+
continue
|
| 72 |
+
value = attribute.Get()
|
| 73 |
+
if value is None:
|
| 74 |
+
continue
|
| 75 |
+
values = list(value) if attribute.GetTypeName() == Sdf.ValueTypeNames.AssetArray else [value]
|
| 76 |
+
replacements = []
|
| 77 |
+
for item in values:
|
| 78 |
+
if not item.path:
|
| 79 |
+
replacements.append(item)
|
| 80 |
+
continue
|
| 81 |
+
path = Path(item.resolvedPath or str(source.parent / item.path)).resolve()
|
| 82 |
+
if not path.is_file():
|
| 83 |
+
raise FileNotFoundError('材质缺失,需针对缺失材质烘焙:' + str(path))
|
| 84 |
+
identity = sha(path)
|
| 85 |
+
relative = 'assets/' + identity + path.suffix.lower()
|
| 86 |
+
intern(path, package / relative, shared / (identity + path.suffix.lower()))
|
| 87 |
+
replacements.append(Sdf.AssetPath(relative))
|
| 88 |
+
copied.append(dict(source=str(path), path=relative, sha256=identity))
|
| 89 |
+
attribute.Set(replacements if attribute.GetTypeName() == Sdf.ValueTypeNames.AssetArray else replacements[0])
|
| 90 |
+
return copied
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
def intern(source, destination, cached):
|
| 94 |
+
cached.parent.mkdir(parents=True, exist_ok=True)
|
| 95 |
+
destination.parent.mkdir(parents=True, exist_ok=True)
|
| 96 |
+
if destination.exists():
|
| 97 |
+
if sha(destination) != sha(source):
|
| 98 |
+
raise ValueError('目标已存在且内容不同:' + str(destination))
|
| 99 |
+
return
|
| 100 |
+
if not cached.exists():
|
| 101 |
+
temporary = cached.with_name(cached.name + '.' + str(os.getpid()) + '.tmp')
|
| 102 |
+
shutil.copyfile(source, temporary)
|
| 103 |
+
try:
|
| 104 |
+
os.link(temporary, cached)
|
| 105 |
+
except FileExistsError:
|
| 106 |
+
pass
|
| 107 |
+
temporary.unlink()
|
| 108 |
+
if sha(cached) != sha(source):
|
| 109 |
+
raise ValueError('内容缓存身份不一致:' + str(cached))
|
| 110 |
+
try:
|
| 111 |
+
os.link(cached, destination)
|
| 112 |
+
except OSError:
|
| 113 |
+
shutil.copyfile(cached, destination)
|
| 114 |
+
|
| 115 |
+
|
| 116 |
+
def deduplicate_geometry(stage, package, shared):
|
| 117 |
+
from pxr import Sdf, Usd, UsdGeom
|
| 118 |
+
rows = []
|
| 119 |
+
for prim in list(stage.Traverse()):
|
| 120 |
+
if not prim.IsA(UsdGeom.Mesh) or prim.IsInstanceProxy():
|
| 121 |
+
continue
|
| 122 |
+
geometry = Usd.Stage.CreateInMemory()
|
| 123 |
+
mesh = UsdGeom.Mesh.Define(geometry, '/Geometry')
|
| 124 |
+
names = []
|
| 125 |
+
for attribute in prim.GetAttributes():
|
| 126 |
+
name = attribute.GetName()
|
| 127 |
+
if name.startswith(('xformOp', 'material:', 'physics:', 'physx', 'rhg:', 'userProperties:')) or name in ('visibility', 'purpose'):
|
| 128 |
+
continue
|
| 129 |
+
if attribute.GetNumTimeSamples():
|
| 130 |
+
raise ValueError('静态 v16 包不允许动画网格:' + str(prim.GetPath()))
|
| 131 |
+
if attribute.HasAuthoredValueOpinion():
|
| 132 |
+
target = mesh.GetPrim().CreateAttribute(name, attribute.GetTypeName(), attribute.IsCustom(), attribute.GetVariability())
|
| 133 |
+
target.Set(attribute.Get())
|
| 134 |
+
for key, value in attribute.GetAllMetadata().items():
|
| 135 |
+
if key not in ('typeName', 'custom', 'variability', 'default'):
|
| 136 |
+
target.SetMetadata(key, value)
|
| 137 |
+
names.append(name)
|
| 138 |
+
identity = hashlib.sha256(geometry.GetRootLayer().ExportToString().encode()).hexdigest()
|
| 139 |
+
cached = shared / (identity + '.usdc')
|
| 140 |
+
if not cached.exists():
|
| 141 |
+
temporary = shared / (identity + '.' + str(os.getpid()) + '.usdc')
|
| 142 |
+
geometry.GetRootLayer().Export(str(temporary))
|
| 143 |
+
try:
|
| 144 |
+
os.link(temporary, cached)
|
| 145 |
+
except FileExistsError:
|
| 146 |
+
pass
|
| 147 |
+
temporary.unlink()
|
| 148 |
+
destination = package / 'assets' / cached.name
|
| 149 |
+
if not destination.exists():
|
| 150 |
+
intern(cached, destination, cached)
|
| 151 |
+
for name in names:
|
| 152 |
+
prim.RemoveProperty(name)
|
| 153 |
+
prim.GetReferences().AddReference('assets/' + cached.name, '/Geometry')
|
| 154 |
+
rows.append(dict(prim_path=str(prim.GetPath()), geometry_content_sha256=identity,
|
| 155 |
+
file_sha256=sha(destination), bytes=destination.stat().st_size))
|
| 156 |
+
return rows
|
| 157 |
+
|
| 158 |
+
|
| 159 |
+
def group_roots(stage, roots, name):
|
| 160 |
+
from pxr import Usd, UsdGeom
|
| 161 |
+
if not roots:
|
| 162 |
+
raise ValueError('没有可分组的几何节点:' + name)
|
| 163 |
+
parents = {path.GetParentPath() for path in roots}
|
| 164 |
+
if len(parents) != 1:
|
| 165 |
+
raise ValueError('实体几何跨越不同变换父节点,需显式处理:' + name)
|
| 166 |
+
parent = next(iter(parents))
|
| 167 |
+
group = parent.AppendChild(name)
|
| 168 |
+
if stage.GetPrimAtPath(group):
|
| 169 |
+
raise ValueError('分组节点冲突:' + str(group))
|
| 170 |
+
UsdGeom.Xform.Define(stage, group)
|
| 171 |
+
for path in roots:
|
| 172 |
+
editor = Usd.NamespaceEditor(stage)
|
| 173 |
+
editor.MovePrimAtPath(path, group.AppendChild(path.name))
|
| 174 |
+
if not editor.CanApplyEdits():
|
| 175 |
+
raise ValueError('USD namespace 编辑无法保留依赖:' + str(path))
|
| 176 |
+
editor.ApplyEdits()
|
| 177 |
+
return group
|
| 178 |
+
|
| 179 |
+
|
| 180 |
+
def entity_paths(stage, manifest):
|
| 181 |
+
paths = {}
|
| 182 |
+
for entity in manifest['entities']:
|
| 183 |
+
identity = entity['entity_id']
|
| 184 |
+
matches = []
|
| 185 |
+
for prim in stage.Traverse():
|
| 186 |
+
values = [prim.GetName()]
|
| 187 |
+
values += [str(attribute.Get()) for attribute in prim.GetAttributes()
|
| 188 |
+
if attribute.GetName().endswith(('entity_id', 'object_name'))]
|
| 189 |
+
if identity in values or any(identity in value for value in values):
|
| 190 |
+
matches.append(prim.GetPath())
|
| 191 |
+
roots = [path for path in matches if not any(path != parent and path.HasPrefix(parent) for parent in matches)]
|
| 192 |
+
if not roots:
|
| 193 |
+
raise ValueError(f'实体没有对应的 USD 几何:{identity}')
|
| 194 |
+
paths[identity] = str(roots[0] if len(roots) == 1 else group_roots(stage, roots, 'rparena_entity_' + identity))
|
| 195 |
+
return paths
|
| 196 |
+
|
| 197 |
+
|
| 198 |
+
def luna_scene_namespace(stage):
|
| 199 |
+
"""对齐冻结 Luna 驱动的碰撞路径约定,只改变节点路径。"""
|
| 200 |
+
from pxr import UsdGeom
|
| 201 |
+
world = stage.GetPrimAtPath('/World')
|
| 202 |
+
if stage.GetPrimAtPath('/World/SceneSmith'):
|
| 203 |
+
raise ValueError('源已有SceneSmith命名空间;需显式核对,禁止重复包裹')
|
| 204 |
+
scene = group_roots(stage, [prim.GetPath() for prim in world.GetChildren()], 'SceneSmith')
|
| 205 |
+
floors = [prim.GetPath() for prim in stage.GetPrimAtPath(scene).GetChildren()
|
| 206 |
+
if prim.GetName().startswith(('floor__','floor_connection__'))]
|
| 207 |
+
if not floors:
|
| 208 |
+
raise ValueError('没有v16 floor__地板;不能伪造Luna地板绑定')
|
| 209 |
+
shell = group_roots(stage, floors, 'shell_floor')
|
| 210 |
+
floor = group_roots(stage, [prim.GetPath() for prim in stage.GetPrimAtPath(shell).GetChildren()], 'Cube')
|
| 211 |
+
stage.GetRootLayer().Save()
|
| 212 |
+
return dict(scene_root=str(scene), floor_path=str(floor),
|
| 213 |
+
geometry_changed=False, driver_contract='frozen_luna_wheel_run_paths')
|
| 214 |
+
|
| 215 |
+
|
| 216 |
+
def luna_scene_entry(package, base):
|
| 217 |
+
from pxr import Sdf, Usd, UsdGeom
|
| 218 |
+
path = package / 'scenesmith/scene.usdc'
|
| 219 |
+
path.parent.mkdir(parents=True, exist_ok=True)
|
| 220 |
+
layer = Sdf.Layer.CreateNew(str(path))
|
| 221 |
+
layer.subLayerPaths = [base]
|
| 222 |
+
layer.defaultPrim = 'World'
|
| 223 |
+
layer.Save()
|
| 224 |
+
stage = Usd.Stage.Open(layer)
|
| 225 |
+
UsdGeom.SetStageUpAxis(stage, UsdGeom.Tokens.z)
|
| 226 |
+
UsdGeom.SetStageMetersPerUnit(stage, 1.0)
|
| 227 |
+
stage.GetRootLayer().Save()
|
| 228 |
+
return 'scenesmith/scene.usdc'
|
| 229 |
+
|
| 230 |
+
|
| 231 |
+
def mass_evidence(entity):
|
| 232 |
+
candidates = [(entity, 'SceneManifest.entity')]
|
| 233 |
+
for key in ('physics', 'physical_properties', 'metadata'):
|
| 234 |
+
if isinstance(entity.get(key), dict):
|
| 235 |
+
candidates.append((entity[key], 'SceneManifest.entity.' + key))
|
| 236 |
+
for values, source in candidates:
|
| 237 |
+
value = values.get('mass_kg')
|
| 238 |
+
if isinstance(value, (float, int)) and not isinstance(value, bool) and math.isfinite(value) and value > 0:
|
| 239 |
+
return float(value), source
|
| 240 |
+
return None, '原始实体和物理元数据未提供质量;禁止臆造'
|
| 241 |
+
|
| 242 |
+
|
| 243 |
+
def author_physics(stage, output, manifest, episode, paths):
|
| 244 |
+
from pxr import Gf, Sdf, Usd, UsdGeom, UsdPhysics
|
| 245 |
+
layer = Sdf.Layer.CreateNew(str(output / 'physics.usda'))
|
| 246 |
+
stage.GetRootLayer().subLayerPaths.insert(0, 'physics.usda')
|
| 247 |
+
stage.SetEditTarget(layer)
|
| 248 |
+
physics_scene = UsdPhysics.Scene.Define(stage, '/World/PhysicsScene')
|
| 249 |
+
physics_scene.CreateGravityDirectionAttr(Gf.Vec3f(0, 0, -1))
|
| 250 |
+
physics_scene.CreateGravityMagnitudeAttr(9.81)
|
| 251 |
+
binding = episode.get('bindings', {}).get('pickup_object', {})
|
| 252 |
+
pickup = binding.get('entity_id')
|
| 253 |
+
entity = next((row for row in manifest['entities'] if row['entity_id'] == pickup), None)
|
| 254 |
+
mass, source = mass_evidence(entity or {})
|
| 255 |
+
if entity is None:
|
| 256 |
+
raise ValueError('BenchmarkEpisode 缺少原生 pickup_object 绑定')
|
| 257 |
+
root = stage.GetPrimAtPath(paths[pickup])
|
| 258 |
+
if mass is not None:
|
| 259 |
+
UsdPhysics.RigidBodyAPI.Apply(root).CreateRigidBodyEnabledAttr(True)
|
| 260 |
+
UsdPhysics.MassAPI.Apply(root).CreateMassAttr(mass)
|
| 261 |
+
excluded = []
|
| 262 |
+
for prim in stage.Traverse():
|
| 263 |
+
if prim.IsA(UsdGeom.Mesh):
|
| 264 |
+
ancestor = prim
|
| 265 |
+
hardware = False
|
| 266 |
+
source_guide = False
|
| 267 |
+
while ancestor and ancestor.GetPath() != Sdf.Path.absoluteRootPath:
|
| 268 |
+
kind=ancestor.GetAttribute('rhg:kind')
|
| 269 |
+
if kind and kind.Get()=='door_swing_keepout_v9':
|
| 270 |
+
source_guide=True
|
| 271 |
+
break
|
| 272 |
+
if ancestor.GetName().startswith(('door_hinge_pin__','door_hinge_plate__','door_hinge_continuous_bridge__','door_leaf_hinge_strap__','door_leaf_detail__')):
|
| 273 |
+
hardware = True
|
| 274 |
+
break
|
| 275 |
+
ancestor = ancestor.GetParent()
|
| 276 |
+
if hardware or source_guide:
|
| 277 |
+
UsdPhysics.CollisionAPI.Apply(prim).CreateCollisionEnabledAttr(False)
|
| 278 |
+
excluded.append(str(prim.GetPath()))
|
| 279 |
+
continue
|
| 280 |
+
if 'pmp20_window_backdrop_' in str(prim.GetPath()):
|
| 281 |
+
UsdPhysics.CollisionAPI.Apply(prim).CreateCollisionEnabledAttr(False)
|
| 282 |
+
excluded.append(str(prim.GetPath()))
|
| 283 |
+
continue
|
| 284 |
+
UsdPhysics.CollisionAPI.Apply(prim).CreateCollisionEnabledAttr(True)
|
| 285 |
+
dynamic = prim.GetPath().HasPrefix(root.GetPath()) and mass is not None
|
| 286 |
+
UsdPhysics.MeshCollisionAPI.Apply(prim).CreateApproximationAttr('convexHull' if dynamic else 'none')
|
| 287 |
+
prim.AddAppliedSchema('PhysxCollisionAPI')
|
| 288 |
+
prim.CreateAttribute('physxCollision:contactOffset', Sdf.ValueTypeNames.Float).Set(0.001)
|
| 289 |
+
prim.CreateAttribute('physxCollision:restOffset', Sdf.ValueTypeNames.Float).Set(0.0)
|
| 290 |
+
layer.Save()
|
| 291 |
+
stage.SetEditTarget(stage.GetRootLayer())
|
| 292 |
+
return dict(pickup_entity_id=pickup, mass_kg=mass, mass_source=source,
|
| 293 |
+
dynamic_authored=mass is not None,
|
| 294 |
+
excluded_attachment_colliders=excluded,
|
| 295 |
+
blockers=[] if mass is not None else ['native_mass_metadata_missing'])
|
| 296 |
+
|
| 297 |
+
|
| 298 |
+
def author_doors(stage, source, output, *, preserve_source_runtime=False):
|
| 299 |
+
from pxr import Gf, Sdf, Usd, UsdGeom, UsdPhysics
|
| 300 |
+
receipt = read(source / 'door_physics_verification.json')
|
| 301 |
+
if receipt.get('schema') != 'rhg.house_door_gate.v1' or receipt.get('passed') is not True:
|
| 302 |
+
raise ValueError('源门 PhysX 门控没有通过')
|
| 303 |
+
expected = receipt.get('evidence_sha256', {})
|
| 304 |
+
required = {'door_physics/input.json.gz','door_physics/mesh_sweep.json',
|
| 305 |
+
'door_physics/runtime/report.json','door_physics/runtime/trace.json',
|
| 306 |
+
'door_physics/runtime/articulated_scene.usdc'}
|
| 307 |
+
if not required.issubset(expected):
|
| 308 |
+
raise ValueError('源门控缺少完整证据集合')
|
| 309 |
+
if sha(source / (source.name + '.blend')) != receipt.get('source_blend_sha256'):
|
| 310 |
+
raise ValueError('源 blend 与门控通过时的身份不一致')
|
| 311 |
+
for name, digest in expected.items():
|
| 312 |
+
path = (source / name).resolve()
|
| 313 |
+
if not path.is_relative_to(source) or sha(path) != digest:
|
| 314 |
+
raise ValueError('门控证据缺失或已变化:' + name)
|
| 315 |
+
import gzip
|
| 316 |
+
payload = json.loads(gzip.decompress((source / 'door_physics/input.json.gz').read_bytes()))
|
| 317 |
+
definitions = payload['doors']
|
| 318 |
+
verified_runtime=Usd.Stage.Open(str(source/'door_physics/runtime/articulated_scene.usdc')) if preserve_source_runtime else None
|
| 319 |
+
layer = Sdf.Layer.CreateNew(str(output / 'doors.usda'))
|
| 320 |
+
stage.GetRootLayer().subLayerPaths.insert(0, 'doors.usda')
|
| 321 |
+
stage.SetEditTarget(layer)
|
| 322 |
+
results = []
|
| 323 |
+
for definition_index,definition in enumerate(definitions):
|
| 324 |
+
name = definition['leaf']
|
| 325 |
+
objects = set(definition['moving_objects'])
|
| 326 |
+
matches = [prim for prim in stage.Traverse() if prim.GetName() in objects]
|
| 327 |
+
parents = [prim for prim in stage.Traverse() if prim.GetName() == 'door_hinge_joint__' + definition['door_id']]
|
| 328 |
+
roots = parents if len(parents) == 1 and all(prim.GetPath().HasPrefix(parents[0].GetPath()) for prim in matches) else [prim for prim in matches if not any(prim != parent and prim.GetPath().HasPrefix(parent.GetPath()) for parent in matches)]
|
| 329 |
+
found_names = {prim.GetName() for prim in matches}
|
| 330 |
+
if found_names != objects:
|
| 331 |
+
raise ValueError('源门的移动部件未完整导出:' + str(objects - found_names))
|
| 332 |
+
body = roots[0] if len(roots) == 1 else stage.GetPrimAtPath(group_roots(stage, [prim.GetPath() for prim in roots], 'rparena_door_' + definition['door_id']))
|
| 333 |
+
mass = definition.get('mass_kg')
|
| 334 |
+
if not mass or not definition.get('mass_provenance'):
|
| 335 |
+
raise ValueError('源门质量及来源缺失:' + name)
|
| 336 |
+
UsdPhysics.RigidBodyAPI.Apply(body).CreateRigidBodyEnabledAttr(True)
|
| 337 |
+
UsdPhysics.MassAPI.Apply(body).CreateMassAttr(mass)
|
| 338 |
+
copied_physics={}
|
| 339 |
+
if verified_runtime:
|
| 340 |
+
verified_body=verified_runtime.GetPrimAtPath(f'/World/Doors/Door_{definition_index}')
|
| 341 |
+
if not verified_body or verified_body.GetAttribute('physics:mass').Get()!=mass:
|
| 342 |
+
raise ValueError('Verified door body identity differs from source definition')
|
| 343 |
+
# Plain OpenUSD exporters may not have the PhysX schema plugin
|
| 344 |
+
# loaded. GetAppliedSchemas then omits authored PhysX APIs even
|
| 345 |
+
# though their attributes remain in the source layer.
|
| 346 |
+
schemas=verified_body.GetMetadata('apiSchemas')
|
| 347 |
+
for schema in schemas.GetAppliedItems() if schemas else []:
|
| 348 |
+
if schema.startswith(('Physics','Physx')):body.AddAppliedSchema(schema)
|
| 349 |
+
for attribute in verified_body.GetAuthoredAttributes():
|
| 350 |
+
if attribute.GetName().startswith(('physics:','physxRigidBody:')):
|
| 351 |
+
body.CreateAttribute(attribute.GetName(),attribute.GetTypeName(),
|
| 352 |
+
custom=attribute.IsCustom(),variability=attribute.GetVariability()).Set(attribute.Get())
|
| 353 |
+
copied_physics[attribute.GetName()]=str(attribute.Get())
|
| 354 |
+
for child in stage.Traverse():
|
| 355 |
+
if child.IsA(UsdGeom.Mesh) and child.GetPath().HasPrefix(body.GetPath()):
|
| 356 |
+
UsdPhysics.MeshCollisionAPI.Apply(child).CreateApproximationAttr('convexHull')
|
| 357 |
+
joint = UsdPhysics.RevoluteJoint.Define(stage, '/World/RHGDoorJoints/' + definition['door_id'])
|
| 358 |
+
joint.CreateAxisAttr('Z')
|
| 359 |
+
joint.CreateBody1Rel().SetTargets([body.GetPath()])
|
| 360 |
+
hinge = Gf.Vec3d(*definition['hinge_xyz_m'])
|
| 361 |
+
transform = UsdGeom.XformCache().GetLocalToWorldTransform(body)
|
| 362 |
+
local = transform.GetInverse().Transform(hinge)
|
| 363 |
+
joint.CreateLocalPos0Attr(Gf.Vec3f(*hinge))
|
| 364 |
+
joint.CreateLocalPos1Attr(Gf.Vec3f(*local))
|
| 365 |
+
orientation = transform.ExtractRotationQuat()
|
| 366 |
+
joint.CreateLocalRot0Attr(Gf.Quatf(1))
|
| 367 |
+
joint.CreateLocalRot1Attr(Gf.Quatf(orientation.GetInverse()))
|
| 368 |
+
sign = definition['opening_sign']
|
| 369 |
+
authored = definition['authored_opening_deg']
|
| 370 |
+
limits = sorted(sign * (angle - authored) for angle in definition['limits_deg'])
|
| 371 |
+
joint.CreateLowerLimitAttr(limits[0])
|
| 372 |
+
joint.CreateUpperLimitAttr(limits[1])
|
| 373 |
+
joint.CreateCollisionEnabledAttr(False)
|
| 374 |
+
drive = UsdPhysics.DriveAPI.Apply(joint.GetPrim(), 'angular')
|
| 375 |
+
drive.CreateTypeAttr('force')
|
| 376 |
+
drive.CreateStiffnessAttr(300.0)
|
| 377 |
+
drive.CreateDampingAttr(80.0)
|
| 378 |
+
drive.CreateMaxForceAttr(150.0)
|
| 379 |
+
drive.CreateTargetPositionAttr(0.0)
|
| 380 |
+
results.append(dict(door_id=definition['door_id'], body=str(body.GetPath()),
|
| 381 |
+
joint=str(joint.GetPath()), source_definition=definition,
|
| 382 |
+
preserved_source_body_physics=copied_physics,
|
| 383 |
+
acceptance='需要在新组合层重新执行开合,源门控不替代新验收'))
|
| 384 |
+
layer.Save()
|
| 385 |
+
stage.SetEditTarget(stage.GetRootLayer())
|
| 386 |
+
return results
|
| 387 |
+
|
| 388 |
+
|
| 389 |
+
def same_support_destination(package, manifest, source, pickup, paths):
|
| 390 |
+
"""用实际 USD 顶面筛选同一长支撑面的新目标;不声称物理可达。"""
|
| 391 |
+
from pxr import Gf, Usd, UsdGeom
|
| 392 |
+
import numpy as np
|
| 393 |
+
stage = Usd.Stage.Open(str(package / 'root.usda'))
|
| 394 |
+
support = stage.GetPrimAtPath(paths[source['entity_id']])
|
| 395 |
+
triangles = []
|
| 396 |
+
transforms = UsdGeom.XformCache()
|
| 397 |
+
for prim in Usd.PrimRange(support):
|
| 398 |
+
if not prim.IsA(UsdGeom.Mesh):
|
| 399 |
+
continue
|
| 400 |
+
mesh = UsdGeom.Mesh(prim)
|
| 401 |
+
transform = transforms.GetLocalToWorldTransform(prim)
|
| 402 |
+
points = np.asarray([list(transform.Transform(Gf.Vec3d(*point)))
|
| 403 |
+
for point in mesh.GetPointsAttr().Get()], dtype=float)
|
| 404 |
+
indices = list(mesh.GetFaceVertexIndicesAttr().Get())
|
| 405 |
+
offset = 0
|
| 406 |
+
for count in mesh.GetFaceVertexCountsAttr().Get():
|
| 407 |
+
face = indices[offset:offset+count]
|
| 408 |
+
offset += count
|
| 409 |
+
for index in range(1, count-1):
|
| 410 |
+
triangles.append(points[[face[0], face[index], face[index+1]]])
|
| 411 |
+
if not triangles:
|
| 412 |
+
return None
|
| 413 |
+
vertices = np.asarray(triangles)
|
| 414 |
+
a, b, c = vertices[:, 0], vertices[:, 1], vertices[:, 2]
|
| 415 |
+
denominator = (b[:, 1]-c[:, 1])*(a[:, 0]-c[:, 0]) + (c[:, 0]-b[:, 0])*(a[:, 1]-c[:, 1])
|
| 416 |
+
valid = np.abs(denominator) > 1e-10
|
| 417 |
+
a, b, c, denominator = a[valid], b[valid], c[valid], denominator[valid]
|
| 418 |
+
z = source['position_xyz_m'][2]
|
| 419 |
+
def supported(x, y):
|
| 420 |
+
u = ((b[:, 1]-c[:, 1])*(x-c[:, 0]) + (c[:, 0]-b[:, 0])*(y-c[:, 1])) / denominator
|
| 421 |
+
v = ((c[:, 1]-a[:, 1])*(x-c[:, 0]) + (a[:, 0]-c[:, 0])*(y-c[:, 1])) / denominator
|
| 422 |
+
height = u*a[:, 2] + v*b[:, 2] + (1-u-v)*c[:, 2]
|
| 423 |
+
hit = height[(u >= -1e-7) & (v >= -1e-7) & (u+v <= 1+1e-7)]
|
| 424 |
+
return bool(len(hit) and abs(float(hit.max())-z) <= .015)
|
| 425 |
+
bounds = UsdGeom.BBoxCache(Usd.TimeCode.Default(), ['default', 'render']).ComputeWorldBound(support).ComputeAlignedBox()
|
| 426 |
+
lower, upper = bounds.GetMin(), bounds.GetMax()
|
| 427 |
+
# 12 cm 的物体包围半宽覆盖原生小物体及标准芥末瓶;不外推给更大物体。
|
| 428 |
+
margin = .12
|
| 429 |
+
candidates = []
|
| 430 |
+
for x in np.arange(lower[0]+margin, upper[0]-margin+.001, .08):
|
| 431 |
+
for y in np.arange(lower[1]+margin, upper[1]-margin+.001, .08):
|
| 432 |
+
distance = math.dist([x, y], pickup['position_xyz_m'][:2])
|
| 433 |
+
if distance < .5:
|
| 434 |
+
continue
|
| 435 |
+
if not all(supported(x+dx, y+dy) for dx, dy in ((0,0),(-margin,-margin),(-margin,margin),(margin,-margin),(margin,margin))):
|
| 436 |
+
continue
|
| 437 |
+
obstructed = False
|
| 438 |
+
for entity in manifest['entities']:
|
| 439 |
+
if entity['entity_id'] in (source['entity_id'], pickup['entity_id']):
|
| 440 |
+
continue
|
| 441 |
+
box = entity.get('world_bbox_m')
|
| 442 |
+
if box and box[0][2] < z+.30 and box[1][2] > z+.015 and box[0][0]-margin < x < box[1][0]+margin and box[0][1]-margin < y < box[1][1]+margin:
|
| 443 |
+
obstructed = True
|
| 444 |
+
break
|
| 445 |
+
if not obstructed:
|
| 446 |
+
candidates.append((distance, float(x), float(y)))
|
| 447 |
+
if not candidates:
|
| 448 |
+
return None
|
| 449 |
+
distance, x, y = max(candidates)
|
| 450 |
+
return {**source, 'anchor_id':source['anchor_id']+'::same_support_transfer',
|
| 451 |
+
'position_xyz_m':[x, y, z], 'geometry_source':'USD_mesh_top_five_probe_points_and_entity_bbox_clearance',
|
| 452 |
+
'derivation_evidence':{'transfer_xy_m':distance, 'footprint_half_width_m':margin,
|
| 453 |
+
'maximum_object_height_m':.25, 'physical_reachability_verified':False}}
|
| 454 |
+
|
| 455 |
+
|
| 456 |
+
def luna_cases(package, manifest, episode, paths, physics, seeds, allow_same_support=False):
|
| 457 |
+
pickup = episode['bindings']['pickup_object']
|
| 458 |
+
entities = {row['entity_id']: row for row in manifest['entities']}
|
| 459 |
+
target = entities[pickup['entity_id']]
|
| 460 |
+
supports = [row for row in manifest['interaction_anchors']
|
| 461 |
+
if row.get('kind') == 'place_on_top' and row['room_id'] == pickup['room_id']]
|
| 462 |
+
if not supports:
|
| 463 |
+
raise ValueError('任务房间没有测量支撑面')
|
| 464 |
+
source = min(supports, key=lambda row: math.dist(row['position_xyz_m'][:2], pickup['position_xyz_m'][:2]))
|
| 465 |
+
destination = episode['bindings'].get('placement_target', {})
|
| 466 |
+
blockers = list(physics['blockers'])
|
| 467 |
+
derivation = '保留 BenchmarkEpisode 同房间目标'
|
| 468 |
+
if destination.get('room_id') != pickup['room_id'] or destination.get('entity_id') == source['entity_id']:
|
| 469 |
+
candidates = [row for row in supports if row['entity_id'] != source['entity_id']
|
| 470 |
+
and 0.35 <= row['position_xyz_m'][2] <= 1.2]
|
| 471 |
+
if not candidates:
|
| 472 |
+
fallback = same_support_destination(package, manifest, source, pickup, paths) if allow_same_support else None
|
| 473 |
+
dimensions = target.get('dimensions_m', target.get('source_dimensions_m'))
|
| 474 |
+
if fallback and dimensions and max(dimensions[:2]) <= .24 and dimensions[2] <= .25:
|
| 475 |
+
destination = fallback
|
| 476 |
+
derivation = '按续跑授权在同一长支撑面转移至少0.5米;USD顶面五点及实体包围盒筛选,物理可达性待完整任务验证'
|
| 477 |
+
else:
|
| 478 |
+
blockers.append('no_distinct_same_room_support')
|
| 479 |
+
derivation = '同房间目标不足;原绑定仅保留为不可执行诊断,不运行跨房间替代任务'
|
| 480 |
+
else:
|
| 481 |
+
destination = max(candidates, key=lambda row: math.dist(source['position_xyz_m'][:2], row['position_xyz_m'][:2]))
|
| 482 |
+
derivation = '首测限定同房间,使用测量锚点派生新的放置任务;原任务保留'
|
| 483 |
+
if not destination.get('entity_id'):
|
| 484 |
+
raise ValueError('没有原始放置目标;禁止构造虚假任务实体')
|
| 485 |
+
room = next(row for row in manifest['rooms'] if row['room_id'] == pickup['room_id'])
|
| 486 |
+
x0, y0, x1, y1 = room['bounds_m']
|
| 487 |
+
spawn = [(x0 + x1) / 2, (y0 + y1) / 2, 0.0]
|
| 488 |
+
# These are nominal search hints, not collision or reachability certificates.
|
| 489 |
+
# The native Luna consumer requires both keys before station search begins.
|
| 490 |
+
pick_xy = pickup['position_xyz_m'][:2]
|
| 491 |
+
place_xy = destination['position_xyz_m'][:2]
|
| 492 |
+
pick_hint = [*spawn[:2], math.atan2(pick_xy[1]-spawn[1], pick_xy[0]-spawn[0])]
|
| 493 |
+
place_hint_xy = [max(x0, min(x1, place_xy[0]+spawn[0]-pick_xy[0])),
|
| 494 |
+
max(y0, min(y1, place_xy[1]+spawn[1]-pick_xy[1]))]
|
| 495 |
+
place_hint = [*place_hint_xy, math.atan2(place_xy[1]-place_hint_xy[1],
|
| 496 |
+
place_xy[0]-place_hint_xy[0])]
|
| 497 |
+
task_id = package.name + '-native-transfer'
|
| 498 |
+
task_entities = [dict(entity_id=key, role='MANIPULATED' if key == pickup['entity_id'] else 'TARGET',
|
| 499 |
+
category=entity.get('category', entity.get('role')), required=True,
|
| 500 |
+
attributes={**entity, **({'parent_entity_id': source['entity_id']} if key == pickup['entity_id'] else {})})
|
| 501 |
+
for key, entity in entities.items()]
|
| 502 |
+
write(package / 'manifests/task.json', dict(schema_version='1.0', task_id=task_id, entities=task_entities,
|
| 503 |
+
goal_predicates=[dict(name='supported_by', subject=pickup['entity_id'], object=destination['entity_id'])],
|
| 504 |
+
metadata=dict(room_dimensions_m=[x1-x0, y1-y0], pick=pickup, place=destination,
|
| 505 |
+
derivation=derivation, original_task_spec=episode['task_spec'],
|
| 506 |
+
original_bindings=episode['bindings'], original_success_conditions=episode.get('success_conditions'))))
|
| 507 |
+
write(package / 'manifests/scene.json', dict(schema_version='1.0', scene_id=package.name,
|
| 508 |
+
task_id=task_id, entity_prim_paths=paths, robot_prim_path='/World/RobotSpawnStub',
|
| 509 |
+
runtime_robot_prim_path='/World/Luna/Robot', runtime='luna_wheel_run_mesh', generic_runtime_supported=False))
|
| 510 |
+
write(package / 'manifests/episode.json', episode)
|
| 511 |
+
dimensions = target.get('dimensions_m', target.get('source_dimensions_m'))
|
| 512 |
+
records = []
|
| 513 |
+
for seed in seeds:
|
| 514 |
+
case = dict(case_id=f'{package.name}-native-s{seed}', seed=seed, group='development', split='development',
|
| 515 |
+
scene_contract_version='rhg-luna/1.0', scene_id=package.name, scene_path=str(package.resolve()),
|
| 516 |
+
source_task_id=task_id, entity_id=pickup['entity_id'], source_id=source['entity_id'],
|
| 517 |
+
destination_id=destination['entity_id'], source_surface_z_m=source['position_xyz_m'][2],
|
| 518 |
+
source_room_id=source['room_id'], destination_room_id=destination['room_id'],
|
| 519 |
+
destination_surface_z_m=destination['position_xyz_m'][2],
|
| 520 |
+
target_position_xy=pickup['position_xyz_m'][:2], destination_position_xy=destination['position_xyz_m'][:2],
|
| 521 |
+
navigation_bounds=[x0,x1,y0,y1], start_base=spawn, dimensions=dimensions,
|
| 522 |
+
pick_base=pick_hint, place_base=place_hint,
|
| 523 |
+
station_hints_physical_reachability_verified=False,
|
| 524 |
+
mass_kg=physics['mass_kg'], scene_mode='original', shape='original',
|
| 525 |
+
object_usd_path=str(package / 'root.usda'), object_prim_path=paths[pickup['entity_id']],
|
| 526 |
+
object_position_xyz_m=[*pickup['position_xyz_m'][:2], target.get('base_z_m', 0.0)],
|
| 527 |
+
object_kind='original', object_id=target.get('asset_id'), native_target_retained=True,
|
| 528 |
+
instruction='在同一房间抓取原生物体,抬升、保持、搬运、放置、释放、撤离并独立读回。',
|
| 529 |
+
runnable=not blockers, blockers=blockers, task_derivation=derivation,
|
| 530 |
+
destination_derivation_evidence=destination.get('derivation_evidence'),
|
| 531 |
+
destination_offset_xy=[0.,0.], object_offset_xy=[0.,0.])
|
| 532 |
+
write(package / ('cases' if case['runnable'] else 'blocked-cases') / (case['case_id'] + '.json'), case)
|
| 533 |
+
records.append(case)
|
| 534 |
+
write(package / 'luna-case-status.json', dict(status='ready' if not blockers else 'blocked',
|
| 535 |
+
reasons=blockers, native_physics=physics, cases=[row['case_id'] for row in records], physical_task_qualified=False))
|
| 536 |
+
return records
|
| 537 |
+
|
| 538 |
+
|
| 539 |
+
def standard_control_cases(package, native_cases, template_path, shared):
|
| 540 |
+
from pxr import Gf, Sdf, Usd, UsdGeom, UsdPhysics
|
| 541 |
+
template = read(template_path)
|
| 542 |
+
if template.get('object_kind') != 'real_mesh' or not template.get('real_mesh'):
|
| 543 |
+
raise ValueError('标准物体对照必须来自已验证的 real_mesh case 配方')
|
| 544 |
+
source = Path(template['mesh_usd_path']).resolve()
|
| 545 |
+
geometry = Path(template['mesh_geometry_path']).resolve()
|
| 546 |
+
if sha(source) != template['mesh_usd_sha256'] or sha(geometry) != template['mesh_geometry_sha256']:
|
| 547 |
+
raise ValueError('标准物体配方的资产哈希变化')
|
| 548 |
+
mass = template['mass_kg']
|
| 549 |
+
if not isinstance(mass,(int,float)) or isinstance(mass,bool) or not math.isfinite(mass) or mass <= 0:
|
| 550 |
+
raise ValueError('标准物体配方必须提供有效质量')
|
| 551 |
+
original = Usd.Stage.Open(str(source))
|
| 552 |
+
original.Flatten().Export(str(package / 'control-object.usdc'))
|
| 553 |
+
asset = Usd.Stage.Open(str(package / 'control-object.usdc'))
|
| 554 |
+
material_assets(asset, package / 'control-object.usdc', package, shared)
|
| 555 |
+
asset.GetRootLayer().Save()
|
| 556 |
+
relative_geometry = 'assets/' + sha(geometry) + '.npz'
|
| 557 |
+
intern(geometry, package / relative_geometry, shared / Path(relative_geometry).name)
|
| 558 |
+
controls = []
|
| 559 |
+
for native in native_cases:
|
| 560 |
+
case = dict(native)
|
| 561 |
+
folder = package / 'controls' / str(native['seed'])
|
| 562 |
+
folder.mkdir(parents=True)
|
| 563 |
+
root = Sdf.Layer.CreateNew(str(folder / 'root.usda'))
|
| 564 |
+
root.subLayerPaths = [luna_scene_entry(folder, '../../../root.usda')]
|
| 565 |
+
root.Save()
|
| 566 |
+
stage = Usd.Stage.Open(str(folder / 'root.usda'))
|
| 567 |
+
stage.SetDefaultPrim(stage.GetPrimAtPath('/World'))
|
| 568 |
+
UsdGeom.SetStageUpAxis(stage, UsdGeom.Tokens.z)
|
| 569 |
+
UsdGeom.SetStageMetersPerUnit(stage, 1.0)
|
| 570 |
+
# Luna's SimulationContext creates the GPU physics scene. Importing a
|
| 571 |
+
# second scene breaks its single-scene DirectGPU view.
|
| 572 |
+
stage.OverridePrim('/World/PhysicsScene').SetActive(False)
|
| 573 |
+
stage.OverridePrim(native['object_prim_path']).SetActive(False)
|
| 574 |
+
target = UsdGeom.Xform.Define(stage, '/World/G1MeshTarget')
|
| 575 |
+
target.GetPrim().GetReferences().AddReference('../../control-object.usdc')
|
| 576 |
+
dimensions = template['dimensions']
|
| 577 |
+
position = [*native['target_position_xy'], native['source_surface_z_m'] + dimensions[2]/2 + 0.003]
|
| 578 |
+
UsdGeom.Xformable(target).ClearXformOpOrder()
|
| 579 |
+
UsdGeom.Xformable(target).AddTranslateOp().Set(Gf.Vec3d(*position))
|
| 580 |
+
UsdPhysics.RigidBodyAPI.Apply(target.GetPrim()).CreateRigidBodyEnabledAttr(True)
|
| 581 |
+
UsdPhysics.MassAPI.Apply(target.GetPrim()).CreateMassAttr(float(mass))
|
| 582 |
+
# Preserve the verified object's authored collision decomposition. Enabling
|
| 583 |
+
# its visual mesh as an extra hull would change the physical recipe.
|
| 584 |
+
collision_parts = [prim for prim in Usd.PrimRange(target.GetPrim())
|
| 585 |
+
if prim.IsA(UsdGeom.Mesh) and prim.HasAPI(UsdPhysics.CollisionAPI)
|
| 586 |
+
and UsdPhysics.CollisionAPI(prim).GetCollisionEnabledAttr().Get() is not False]
|
| 587 |
+
if not collision_parts:
|
| 588 |
+
raise ValueError('标准物体配方没有已声明的碰撞部件')
|
| 589 |
+
stage.GetRootLayer().Save()
|
| 590 |
+
for name in ('scene.json','task.json','episode.json'):
|
| 591 |
+
value = read(package / 'manifests' / name)
|
| 592 |
+
if name == 'scene.json':
|
| 593 |
+
value['entity_prim_paths'][native['entity_id']] = '/World/G1MeshTarget'
|
| 594 |
+
if name == 'task.json':
|
| 595 |
+
for entity in value['entities']:
|
| 596 |
+
if entity['entity_id'] == native['entity_id']:
|
| 597 |
+
entity['attributes'].update(asset_id=template['mesh_source_id'], mass_kg=mass,
|
| 598 |
+
dimensions_m=dimensions, control_template=str(template_path))
|
| 599 |
+
write(folder / 'manifests' / name, value)
|
| 600 |
+
blockers = [reason for reason in native['blockers'] if reason != 'native_mass_metadata_missing']
|
| 601 |
+
if native.get('destination_derivation_evidence') and (max(dimensions[:2]) > .24 or dimensions[2] > .25):
|
| 602 |
+
blockers.append('standard_object_exceeds_same_support_screen_dimensions')
|
| 603 |
+
case.update(case_id=native['case_id'].replace('-native-', '-standard-control-'),
|
| 604 |
+
scene_path=str(folder), object_kind='real_mesh', real_mesh=True, dimensions=dimensions,
|
| 605 |
+
physics_scene_owner='luna_runtime',object_usd_path=str(folder/'root.usda'),
|
| 606 |
+
object_prim_path='/World/G1MeshTarget',object_position_xyz_m=position,
|
| 607 |
+
mass_kg=mass, mesh_source_id=template['mesh_source_id'],
|
| 608 |
+
object_id=template['object_id'], close_position=template['close_position'],
|
| 609 |
+
color=template.get('color',[.2,.4,.8]), color_name=template.get('color_name','authored_texture'),
|
| 610 |
+
mesh_usd_path=str(package / 'control-object.usdc'), mesh_usd_sha256=sha(package / 'control-object.usdc'),
|
| 611 |
+
mesh_geometry_path=str(package / relative_geometry), mesh_geometry_sha256=sha(geometry),
|
| 612 |
+
mesh_initial_root_position=position, mesh_initial_yaw_rad=0.0,
|
| 613 |
+
native_target_retained=False, parent_room_native_target_retained=False,
|
| 614 |
+
condition='standard_object_control', original_native_case_id=native['case_id'],
|
| 615 |
+
substitution_reason=native['blockers'], blockers=blockers, runnable=not blockers,
|
| 616 |
+
standard_object_provenance=dict(template_path=str(template_path), template_sha256=sha(template_path)))
|
| 617 |
+
write(package / ('cases' if case['runnable'] else 'blocked-cases') / (case['case_id'] + '.json'), case)
|
| 618 |
+
controls.append(case)
|
| 619 |
+
return controls
|
| 620 |
+
|
| 621 |
+
|
| 622 |
+
def native_luna_entries(package, cases):
|
| 623 |
+
from pxr import Sdf, Usd, UsdGeom
|
| 624 |
+
for case in cases:
|
| 625 |
+
folder = package/'native'/str(case['seed'])
|
| 626 |
+
folder.mkdir(parents=True)
|
| 627 |
+
root = Sdf.Layer.CreateNew(str(folder/'root.usda'))
|
| 628 |
+
root.subLayerPaths = [luna_scene_entry(folder, '../../../root.usda')]
|
| 629 |
+
root.Save()
|
| 630 |
+
stage = Usd.Stage.Open(str(folder/'root.usda'))
|
| 631 |
+
stage.SetDefaultPrim(stage.GetPrimAtPath('/World'))
|
| 632 |
+
UsdGeom.SetStageUpAxis(stage, 'Z')
|
| 633 |
+
UsdGeom.SetStageMetersPerUnit(stage, 1.0)
|
| 634 |
+
stage.OverridePrim('/World/PhysicsScene').SetActive(False)
|
| 635 |
+
stage.GetRootLayer().Save()
|
| 636 |
+
for name in ('scene.json','task.json','episode.json'):
|
| 637 |
+
write(folder/'manifests'/name, read(package/'manifests'/name))
|
| 638 |
+
case.update(scene_path=str(folder),physics_scene_owner='luna_runtime')
|
| 639 |
+
write(package/('cases' if case['runnable'] else 'blocked-cases')/(case['case_id']+'.json'),case)
|
| 640 |
+
|
| 641 |
+
def pinned_runtime_files(package):
|
| 642 |
+
runtime={}
|
| 643 |
+
if (package/'baked-material-delivery.json').exists():
|
| 644 |
+
for name,dependency in read(package/'baked-material-delivery.json')['runtime_dependencies'].items():
|
| 645 |
+
path=Path(dependency['path']).resolve()
|
| 646 |
+
if name!='OmniSurface.mdl' or path.name!=name or not path.is_file() or sha(path)!=dependency['sha256']:
|
| 647 |
+
raise ValueError('声明的内置 MDL 运行时依赖不匹配')
|
| 648 |
+
runtime[path]=dependency['sha256']
|
| 649 |
+
return runtime
|
| 650 |
+
|
| 651 |
+
|
| 652 |
+
def register_authored_luna_scene(package, folder):
|
| 653 |
+
"""登记新整屋的完整源图;不套用旧房间外观恢复或授予外观资格。"""
|
| 654 |
+
from pxr import Usd, UsdGeom, UsdUtils
|
| 655 |
+
entry = folder / 'root.usda'
|
| 656 |
+
stage = Usd.Stage.Open(str(entry))
|
| 657 |
+
meshes = [prim for prim in stage.Traverse() if prim.IsA(UsdGeom.Mesh)]
|
| 658 |
+
evidence = dict(world_default_prim=str(stage.GetDefaultPrim().GetPath()) == '/World',
|
| 659 |
+
meter_units=UsdGeom.GetStageMetersPerUnit(stage) == 1.0,
|
| 660 |
+
z_up=UsdGeom.GetStageUpAxis(stage) == 'Z',
|
| 661 |
+
floor_present=bool(stage.GetPrimAtPath('/World/SceneSmith/shell_floor/Cube')),
|
| 662 |
+
wall_meshes=sum('wall' in str(prim.GetPath()).lower() for prim in meshes),
|
| 663 |
+
ceiling_meshes=sum('ceiling' in str(prim.GetPath()).lower() for prim in meshes),
|
| 664 |
+
mesh_count=len(meshes))
|
| 665 |
+
if not all(evidence[key] for key in ('world_default_prim','meter_units','z_up','floor_present','wall_meshes','ceiling_meshes')):
|
| 666 |
+
raise ValueError('新整屋登记缺少明确的轴向、单位或完整建筑外壳')
|
| 667 |
+
layers, assets, unresolved = UsdUtils.ComputeAllDependencies(str(entry))
|
| 668 |
+
if unresolved:
|
| 669 |
+
raise ValueError('新整屋登记存在未解析依赖:'+str(unresolved))
|
| 670 |
+
paths = {entry.resolve(), *(Path(layer.realPath).resolve() for layer in layers if layer.realPath),
|
| 671 |
+
*(Path(str(asset)).resolve() for asset in assets),
|
| 672 |
+
*(path.resolve() for path in (folder/'manifests').glob('*.json')),
|
| 673 |
+
(package/'provenance.json').resolve()}
|
| 674 |
+
runtime=pinned_runtime_files(package)
|
| 675 |
+
if any(not path.is_file() or (not path.is_relative_to(package.resolve()) and path not in runtime) for path in paths):
|
| 676 |
+
raise ValueError('新整屋登记依赖缺失或超出包目录')
|
| 677 |
+
write(folder/'rhg-authored-scene.json', dict(schema='rparena.rhg-authored-full-scene/1',
|
| 678 |
+
entry=str(entry.resolve()),entry_sha256=sha(entry),structural_evidence=evidence,
|
| 679 |
+
input_sha256={str(path):sha(path) for path in sorted(paths)},
|
| 680 |
+
runtime_dependency_sha256={str(path):value for path,value in runtime.items()},
|
| 681 |
+
visual_qualification='unqualified_new_house',physical_task_qualified=False))
|
| 682 |
+
|
| 683 |
+
def export_scene(args):
|
| 684 |
+
from pxr import Sdf, Usd, UsdGeom, Work
|
| 685 |
+
Work.SetConcurrencyLimit(4)
|
| 686 |
+
source = args.source.resolve()
|
| 687 |
+
output = args.output.resolve()
|
| 688 |
+
if not re.fullmatch(r'[a-z0-9]+(?:-[a-z0-9]+)*', args.scene_id) or not re.fullmatch(r'[a-z0-9]+(?:-[a-z0-9]+)*', output.name):
|
| 689 |
+
raise ValueError('scene-id 和输出目录名必须符合 RPArena static-scene 标识格式')
|
| 690 |
+
if output.exists():
|
| 691 |
+
raise FileExistsError('输出必须为新目录:' + str(output))
|
| 692 |
+
output.mkdir(parents=True)
|
| 693 |
+
records = []
|
| 694 |
+
try:
|
| 695 |
+
manifest = read(source / 'SceneManifest.v16.json')
|
| 696 |
+
episode = read(source / 'BenchmarkEpisode.v16.json')
|
| 697 |
+
if manifest.get('schema') != 'robohousegen.SceneManifest.v16' or episode.get('schema') != 'robohousegen.BenchmarkEpisode.v16':
|
| 698 |
+
raise ValueError('只接受 v16 的 SceneManifest 与 BenchmarkEpisode')
|
| 699 |
+
generation_record = source.parent.parent / 'generation-timing.json'
|
| 700 |
+
records.append(dict(stage='generation', status='measured' if generation_record.exists() else 'not_available',
|
| 701 |
+
evidence=read(generation_record) if generation_record.exists() else None))
|
| 702 |
+
with timed(records, 'usd_export', output) as row:
|
| 703 |
+
delivery_policy=getattr(args,'delivery_policy','source')
|
| 704 |
+
if delivery_policy=='source' and args.reuse_package:
|
| 705 |
+
raise ValueError('Source delivery requires fresh source conversion; legacy visual packages cannot be reused')
|
| 706 |
+
if args.reuse_package:
|
| 707 |
+
reuse = args.reuse_package.resolve()
|
| 708 |
+
previous = read(reuse/'provenance.json')
|
| 709 |
+
expected_sources = previous['source_sha256']
|
| 710 |
+
if any(sha(source/name) != expected for name,expected in expected_sources.items()):
|
| 711 |
+
raise ValueError('复用包的源场景身份不同;禁止复用视觉资产')
|
| 712 |
+
delivery = read(reuse/'delivery-manifest.json')
|
| 713 |
+
for name,expected in delivery['files'].items():
|
| 714 |
+
path = (reuse/name).resolve()
|
| 715 |
+
if not path.is_relative_to(reuse) or not path.is_file() or sha(path) != expected:
|
| 716 |
+
raise ValueError('复用包交付文件缺失、越界或被修改:'+name)
|
| 717 |
+
shared = args.shared_assets.resolve()
|
| 718 |
+
for path in sorted((reuse/'assets').iterdir()):
|
| 719 |
+
if path.is_file():
|
| 720 |
+
intern(path,output/'assets'/path.name,shared/path.name)
|
| 721 |
+
# The visual root is editable below; never hardlink it to the old run.
|
| 722 |
+
shutil.copyfile(reuse/'visual.usdc',output/'visual.usdc')
|
| 723 |
+
visual = reuse/'visual.usdc'
|
| 724 |
+
row.update(visual_reuse='verified_package',reuse_package=str(reuse),
|
| 725 |
+
reuse_delivery_sha256=sha(reuse/'delivery-manifest.json'))
|
| 726 |
+
else:
|
| 727 |
+
visual = source / 'visual_scene_base.usd'
|
| 728 |
+
transfer=None
|
| 729 |
+
if delivery_policy=='source':
|
| 730 |
+
transfer=getattr(args,'baked_transfer',None)
|
| 731 |
+
reference=getattr(args,'source_reference',None)
|
| 732 |
+
if transfer is None:
|
| 733 |
+
if not args.blender:raise ValueError('Default source delivery needs Blender for prepare/render/bake')
|
| 734 |
+
repo=Path(__file__).resolve().parents[2]
|
| 735 |
+
reference=output/'source-reference'
|
| 736 |
+
commands=[
|
| 737 |
+
[args.blender,'-b','-t','2','--python-exit-code','1','--python',str(repo/'scripts/render_delivery_reference.py'),'--','--source',str(source),'--output',str(reference)],
|
| 738 |
+
[args.blender,'-b','-t','2','--python-exit-code','1','--python',str(repo/'scripts/bake_delivery_scene.py'),'--','--reference',str(reference),'--output',str(output/'source-transfer')]]
|
| 739 |
+
if getattr(args,'window_scenery',None):commands[0]+=['--window-scenery',str(args.window_scenery)]
|
| 740 |
+
from .source_device import blender_environment
|
| 741 |
+
with blender_environment(output,getattr(args,'gpu',None)) as environment:
|
| 742 |
+
for index,command in enumerate(commands):
|
| 743 |
+
with (output/f'source-stage-{index}.log').open('x') as log:subprocess.run(command,check=True,stdout=log,stderr=subprocess.STDOUT,env=environment)
|
| 744 |
+
transfer=output/'source-transfer'
|
| 745 |
+
if reference is None:raise ValueError('Baked delivery requires its saved Blender reference')
|
| 746 |
+
receipt=read(transfer/'bake-receipt.json')
|
| 747 |
+
if receipt['source_sha256']!=sha(reference/'source.blend') or receipt['geometry_max_error_m']>1e-6:
|
| 748 |
+
raise ValueError('Baked source identity or geometry changed')
|
| 749 |
+
from .rparena_baked import verify_images
|
| 750 |
+
parity=verify_images(transfer,reference,getattr(args,'texture_contract',None));write(output/'baked-source-parity.json',parity)
|
| 751 |
+
# Keep the existing mean-error gate. Clarity has its own strict
|
| 752 |
+
# verdict; retain it even when downstream diagnosis is needed.
|
| 753 |
+
if not parity['mean_error_passed']:
|
| 754 |
+
raise ValueError('Baked Blender source differs beyond the original PMP20 5/255 contract; keep failed views')
|
| 755 |
+
shutil.copyfile(reference/'source.blend',output/'source.blend')
|
| 756 |
+
source_contract=read(reference/'source-delivery.json')
|
| 757 |
+
if source_contract['display']!=receipt['source_display']:
|
| 758 |
+
raise ValueError('Source display changed after baking')
|
| 759 |
+
source_contract['ocio_config']='colormanagement/config.ocio'
|
| 760 |
+
write(output/'source-delivery.json',source_contract)
|
| 761 |
+
rays=read(reference/'source-ray-visibility.json')
|
| 762 |
+
if rays['source_blend_sha256']!=receipt['source_sha256']:
|
| 763 |
+
raise ValueError('Source ray visibility belongs to another Blender baseline')
|
| 764 |
+
write(output/'source-ray-visibility.json',rays)
|
| 765 |
+
shutil.copyfile(reference/'views.json',output/'reference-views.json')
|
| 766 |
+
shutil.copytree(reference/'colormanagement',output/'colormanagement')
|
| 767 |
+
visual=transfer/'visual.usdc'
|
| 768 |
+
reusable = False
|
| 769 |
+
if visual.exists():
|
| 770 |
+
candidate = Usd.Stage.Open(str(visual))
|
| 771 |
+
reusable = candidate is not None and all(all(count == 3 for count in UsdGeom.Mesh(prim).GetFaceVertexCountsAttr().Get())
|
| 772 |
+
for prim in candidate.Traverse() if prim.IsA(UsdGeom.Mesh))
|
| 773 |
+
candidate = None
|
| 774 |
+
if delivery_policy=='source' and not reusable:
|
| 775 |
+
raise ValueError('Baked transfer must contain a triangulated, openable USD')
|
| 776 |
+
if not reusable and not args.reuse_package:
|
| 777 |
+
if not args.blender:
|
| 778 |
+
raise ValueError('缺少 stage4 USD;传 --blender 以复用 RHG stage4')
|
| 779 |
+
repo = Path(__file__).resolve().parents[2]
|
| 780 |
+
command = [args.blender, '--background', '--python-exit-code', '1', '--python',
|
| 781 |
+
str(repo / 'scripts/export_rparena_v16_visual.py'), '--', str(source)]
|
| 782 |
+
with (output / 'usd-export.log').open('x') as log:
|
| 783 |
+
subprocess.run(command, stdout=log, stderr=subprocess.STDOUT, check=True)
|
| 784 |
+
visual = source / 'visual_scene_rparena_triangles.usd'
|
| 785 |
+
row['reused_stage4'] = reusable or bool(args.reuse_package)
|
| 786 |
+
row['triangulation'] = 'verified_package_triangles' if args.reuse_package else 'stage4_native_triangles' if reusable else 'Blender_stage4_explicit_triangulation_for_frozen_Luna_collision_consumer'
|
| 787 |
+
stage = Usd.Stage.Open(str(visual))
|
| 788 |
+
if not stage or not stage.GetPrimAtPath('/World'):
|
| 789 |
+
raise ValueError('stage4 USD 必须含 /World')
|
| 790 |
+
if UsdGeom.GetStageUpAxis(stage) != 'Z' or abs(UsdGeom.GetStageMetersPerUnit(stage)-1) > 1e-9:
|
| 791 |
+
raise ValueError('源场景必须为 Z-up、米制,禁止隐式缩放')
|
| 792 |
+
stage.GetRootLayer().Export(str(output / 'visual.usdc'))
|
| 793 |
+
stage = Usd.Stage.Open(str(output / 'visual.usdc'))
|
| 794 |
+
stage.SetDefaultPrim(stage.GetPrimAtPath('/World'))
|
| 795 |
+
if delivery_policy=='source':
|
| 796 |
+
for prim in stage.Traverse():
|
| 797 |
+
if 'glass__window__' in str(prim.GetPath()) and prim.IsA(UsdGeom.Mesh):
|
| 798 |
+
UsdGeom.Imageable(prim).CreateVisibilityAttr(UsdGeom.Tokens.invisible)
|
| 799 |
+
shared = args.shared_assets.resolve()
|
| 800 |
+
shared.mkdir(parents=True, exist_ok=True)
|
| 801 |
+
textures = material_assets(stage, visual, output, shared)
|
| 802 |
+
if transfer is not None:
|
| 803 |
+
from .rparena_baked import apply_baked
|
| 804 |
+
baked=apply_baked(stage,transfer,output,shared)
|
| 805 |
+
write(output/'baked-material-delivery.json',baked)
|
| 806 |
+
from .texture_compression import compress_colors
|
| 807 |
+
compression_policy=getattr(args,'texture_compression','auto')
|
| 808 |
+
if compression_policy=='auto':compression_policy='bc7' if 'texture_budget' in receipt else 'preserve'
|
| 809 |
+
compression=compress_colors(stage,output,shared,compression_policy)
|
| 810 |
+
variants={}
|
| 811 |
+
for item in compression['converted']:variants.setdefault(item['original'],{})[item['path']]=item
|
| 812 |
+
textures=[dict(source=item['source'],path=variant['path'],sha256=variant['sha256'])
|
| 813 |
+
for item in textures for variant in (variants.get(item['path'],{item['path']:item})).values()]
|
| 814 |
+
baked['texture_compression']=compression
|
| 815 |
+
write(output/'baked-material-delivery.json',baked)
|
| 816 |
+
if args.reuse_package:
|
| 817 |
+
old_metadata = read(args.reuse_package/'manifest.json')
|
| 818 |
+
namespace = old_metadata['luna_namespace']
|
| 819 |
+
paths = old_metadata['entity_prim_paths']
|
| 820 |
+
if not stage.GetPrimAtPath(namespace['floor_path']) or any(not stage.GetPrimAtPath(path) for path in paths.values()):
|
| 821 |
+
raise ValueError('复用视觉的 Luna 命名空间或实体映射不完整')
|
| 822 |
+
else:
|
| 823 |
+
namespace = luna_scene_namespace(stage)
|
| 824 |
+
paths = entity_paths(stage, manifest)
|
| 825 |
+
with timed(records, 'geometry_deduplication', output) as row:
|
| 826 |
+
geometry = deduplicate_geometry(stage, output, shared)
|
| 827 |
+
row.update(mesh_count=len(geometry), shared_asset_count=len({item['geometry_content_sha256'] for item in geometry}))
|
| 828 |
+
compact = output / 'visual-compact.usdc'
|
| 829 |
+
stage.GetRootLayer().Export(str(compact))
|
| 830 |
+
compact.replace(output / 'visual.usdc')
|
| 831 |
+
root = Sdf.Layer.CreateNew(str(output / 'root.usda'))
|
| 832 |
+
root.subLayerPaths = [luna_scene_entry(output, '../visual.usdc')]
|
| 833 |
+
root.Save()
|
| 834 |
+
stage = Usd.Stage.Open(str(output / 'root.usda'))
|
| 835 |
+
stage.SetDefaultPrim(stage.GetPrimAtPath('/World'))
|
| 836 |
+
UsdGeom.SetStageUpAxis(stage, 'Z')
|
| 837 |
+
UsdGeom.SetStageMetersPerUnit(stage, 1.0)
|
| 838 |
+
with timed(records, 'physics_layers', output):
|
| 839 |
+
physics = author_physics(stage, output, manifest, episode, paths)
|
| 840 |
+
doors = author_doors(stage, source, output,preserve_source_runtime=delivery_policy=='source')
|
| 841 |
+
native=dict(instances=[],body_paths=[],joint_count=0)
|
| 842 |
+
if delivery_policy=='source':
|
| 843 |
+
from .rparena_native import author_native
|
| 844 |
+
native=author_native(stage,source,output,paths,shared)
|
| 845 |
+
write(output/'native-articulation-delivery.json',native)
|
| 846 |
+
stage.GetRootLayer().Save()
|
| 847 |
+
with timed(records, 'metadata_and_luna_cases', output):
|
| 848 |
+
cases = luna_cases(output, manifest, episode, paths, physics, args.seeds,
|
| 849 |
+
allow_same_support=args.allow_same_support)
|
| 850 |
+
native_luna_entries(output, cases)
|
| 851 |
+
controls = []
|
| 852 |
+
if args.control_template:
|
| 853 |
+
controls = standard_control_cases(output, cases, args.control_template.resolve(), shared)
|
| 854 |
+
case_status = read(output / 'luna-case-status.json')
|
| 855 |
+
case_status['standard_control_cases'] = [row['case_id'] for row in controls]
|
| 856 |
+
case_status['runnable_case_count'] = sum(row['runnable'] for row in cases + controls)
|
| 857 |
+
write(output / 'luna-case-status.json', case_status)
|
| 858 |
+
write(output / 'SceneManifest.v16.json', manifest)
|
| 859 |
+
write(output / 'BenchmarkEpisode.v16.json', episode)
|
| 860 |
+
commit = args.rhg_commit or subprocess.check_output(['git','-C',str(Path(__file__).resolve().parents[2]),'rev-parse','HEAD'], text=True).strip()
|
| 861 |
+
provenance = dict(rhg_commit=commit, source_run=str(source),
|
| 862 |
+
source_sha256={name:sha(source/name) for name in ('SceneManifest.v16.json','BenchmarkEpisode.v16.json',
|
| 863 |
+
'composition_manifest.runtime.json',source.name+'.blend')},
|
| 864 |
+
adapter_sha256=sha(__file__), physical_task_qualified=False)
|
| 865 |
+
write(output / 'provenance.json', provenance)
|
| 866 |
+
write(output / 'manifest.json', dict(schema='rhg.rparena.v16/1', provenance=provenance,
|
| 867 |
+
rooms=manifest['rooms'], portals=manifest['portals'],
|
| 868 |
+
support_surfaces=[row for row in manifest['interaction_anchors'] if row['kind']=='place_on_top'],
|
| 869 |
+
entity_prim_paths=paths, luna_namespace=namespace, task=episode, doors=doors, physics=physics,
|
| 870 |
+
texture_assets=textures, geometry_assets=geometry,
|
| 871 |
+
baked_materials=[dict(object=r['object'],source_material=r['source_material'],
|
| 872 |
+
usd_material_name=r['usd_material_name'],channels=list(r['maps'])) for r in receipt['materials']] if transfer is not None else [],
|
| 873 |
+
material_delivery=baked if transfer is not None else None,native_articulations=native,
|
| 874 |
+
source_texture_acceptance=parity if transfer is not None else None,
|
| 875 |
+
baking_status='source_side_baked_after_saved_Blender_reference' if transfer is not None else 'legacy_control_unmodified_visual'))
|
| 876 |
+
write(output / 'SCENE-DYNAMIC-ACTORS.json', dict(
|
| 877 |
+
source_manifest=str((output/'manifest.json').resolve()),
|
| 878 |
+
source_sha256=sha(output/'manifest.json'),
|
| 879 |
+
body_paths=[door['body'] for door in doors]+native['body_paths'],
|
| 880 |
+
physical_parameters_changed=False))
|
| 881 |
+
write(output / 'plan.json', dict(source=dict(units_scale=1.0)))
|
| 882 |
+
write(output / 'portability.json', dict(schema='rhg.portability/1', usd_relative_content_paths=True,
|
| 883 |
+
runtime_libraries='explicit installed SDK paths and SHA256; no external scene textures or geometry',
|
| 884 |
+
storage='包内 assets 使用内容哈希;同文件系统跨包硬链接共享,跨盘复制',
|
| 885 |
+
luna_case_paths='case 中保留当前运行绝对路径;迁移安装后需生成独立 case 副本并更新路径,不修改封存包', physical_acceptance='not_run'))
|
| 886 |
+
register_authored_luna_scene(output, output)
|
| 887 |
+
for folder in sorted([*(output/'controls').glob('*'),*(output/'native').glob('*')]):
|
| 888 |
+
register_authored_luna_scene(output, folder)
|
| 889 |
+
with timed(records, 'packaging', output):
|
| 890 |
+
from pxr import UsdUtils
|
| 891 |
+
layers, assets, unresolved = UsdUtils.ComputeAllDependencies(str(output / 'root.usda'))
|
| 892 |
+
runtime=pinned_runtime_files(output)
|
| 893 |
+
external = [str(path) for path in [*(layer.realPath for layer in layers), *assets]
|
| 894 |
+
if not Path(path).resolve().is_relative_to(output) and Path(path).resolve() not in runtime]
|
| 895 |
+
if unresolved or external:
|
| 896 |
+
raise ValueError('包不可迁移:' + str(dict(unresolved=list(unresolved), external=external)))
|
| 897 |
+
metadata = dict(format='rparena-static-scene', schema_version='1.0', id=args.scene_id,
|
| 898 |
+
bundle_id=output.name, root_usd='root.usda', runtime_files=[], source=provenance,
|
| 899 |
+
acceptance=dict(appearance='not_run',physical_task_qualified=False),
|
| 900 |
+
rooms=manifest['rooms'], portals=manifest['portals'], entity_prim_paths=paths,
|
| 901 |
+
support_surfaces=[row for row in manifest['interaction_anchors'] if row['kind']=='place_on_top'])
|
| 902 |
+
metadata['runtime_files'] = sorted([path.relative_to(output).as_posix() for path in output.rglob('*') if path.is_file()
|
| 903 |
+
and path.name not in ('timing.json', 'usd-export.log')]+['rparena.scene.json'])
|
| 904 |
+
write(output / 'rparena.scene.json', metadata)
|
| 905 |
+
files = {path.relative_to(output).as_posix():sha(path) for path in output.rglob('*') if path.is_file()
|
| 906 |
+
and path.name not in ('delivery-manifest.json','checksums.sha256','timing.json','usd-export.log')}
|
| 907 |
+
write(output / 'delivery-manifest.json',dict(scene_entry='root.usda', files=files,
|
| 908 |
+
acceptance_status='not_run', runtime_dependencies=baked['runtime_dependencies'] if transfer is not None else {}))
|
| 909 |
+
(output / 'checksums.sha256').write_text(''.join(f'{digest} {name}\n' for name,digest in sorted(files.items())))
|
| 910 |
+
write(output / 'export-result.json', dict(status='exported_unqualified', package=str(output),
|
| 911 |
+
case_count=len(cases)+len(controls), native_case_count=len(cases),
|
| 912 |
+
runnable_case_count=sum(row['runnable'] for row in cases+controls),
|
| 913 |
+
blockers=sorted({reason for row in cases+controls for reason in row['blockers']}),
|
| 914 |
+
physical_task_qualified=False))
|
| 915 |
+
for name in ('rparena_installation', 'isaac_loading_acceptance'):
|
| 916 |
+
records.append(dict(stage=name, status='not_run', wall_s=None, gpu_s=None,
|
| 917 |
+
peak_rss_bytes=None, output_bytes=None))
|
| 918 |
+
write(output / 'timing.json', records)
|
| 919 |
+
except Exception as error:
|
| 920 |
+
write(output / 'export-result.json', dict(status='failed', error=str(error),traceback=traceback.format_exc()))
|
| 921 |
+
raise
|
| 922 |
+
|
| 923 |
+
|
| 924 |
+
def main(argv=None):
|
| 925 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 926 |
+
parser.add_argument('source', type=Path)
|
| 927 |
+
parser.add_argument('--output', type=Path, required=True)
|
| 928 |
+
parser.add_argument('--scene-id', required=True)
|
| 929 |
+
parser.add_argument('--shared-assets', type=Path, required=True)
|
| 930 |
+
parser.add_argument('--blender')
|
| 931 |
+
parser.add_argument('--delivery-policy',choices=['source','legacy-control'],default='source')
|
| 932 |
+
parser.add_argument('--window-scenery',type=Path)
|
| 933 |
+
parser.add_argument('--baked-transfer',type=Path)
|
| 934 |
+
parser.add_argument('--source-reference',type=Path)
|
| 935 |
+
parser.add_argument('--texture-contract',type=Path,help='Frozen source/baked texture ROI and threshold contract')
|
| 936 |
+
parser.add_argument('--texture-compression',choices=('auto','preserve','png','bc7'),default='auto',help='auto uses BC7 for budgeted scenes and preserves legacy controls; png is explicit PNG8 fallback; normals stay PNG')
|
| 937 |
+
parser.add_argument('--gpu',help='Idle local GPU index/UUID for source rendering and baking; otherwise reserve an idle GPU')
|
| 938 |
+
parser.add_argument('--reuse-package',type=Path,help='源场景四项哈希相同且交付文件全量核验后,复用已封存包的视觉资产;新建全部物理层、入口与元数据')
|
| 939 |
+
parser.add_argument('--rhg-commit', help='非 Git 部署目录必须传入已核实的源提交;adapter 文件另外计算哈希')
|
| 940 |
+
parser.add_argument('--control-template', type=Path, help='保留原生条件后,按已验证 case 的质量和资产创建标准物体对照')
|
| 941 |
+
parser.add_argument('--allow-same-support', action='store_true', help='无第二支撑面时,按续跑授权用实际USD顶面筛选同支撑面至少0.5米转移')
|
| 942 |
+
parser.add_argument('--seeds', type=int, nargs='+', default=[2026101801,2026101802,2026101803])
|
| 943 |
+
args = parser.parse_args(argv)
|
| 944 |
+
export_scene(args)
|
| 945 |
+
return 0
|
docs/reproduction/public_conversion_code/packages/adapters/sam3d.py
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import json
|
| 4 |
+
import os
|
| 5 |
+
import shutil
|
| 6 |
+
import shlex
|
| 7 |
+
import subprocess
|
| 8 |
+
from dataclasses import dataclass
|
| 9 |
+
from pathlib import Path
|
| 10 |
+
from typing import Literal
|
| 11 |
+
|
| 12 |
+
from packages.adapters.protocols import NotConfiguredError
|
| 13 |
+
from packages.core.files import atomic_write_text
|
| 14 |
+
from packages.runtime.gpu_scheduler import GpuInfo, parse_nvidia_smi
|
| 15 |
+
|
| 16 |
+
DEFAULT_SAM3_CHECKPOINT = Path("/data/wyc/RoboHouseGenData/assets/high_quality/sam3/sam3.pt")
|
| 17 |
+
DEFAULT_SAM3D_PIPELINE = Path(
|
| 18 |
+
"/data/wyc/RoboHouseGenData/assets/high_quality/sam-3d-objects/checkpoints/pipeline.yaml"
|
| 19 |
+
)
|
| 20 |
+
Sam3DMemoryStrategy = Literal["single_gpu", "staged_process", "fsdp"]
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
@dataclass(frozen=True, slots=True)
|
| 24 |
+
class Sam3DSettings:
|
| 25 |
+
command: tuple[str, ...]
|
| 26 |
+
sam3_checkpoint: Path = DEFAULT_SAM3_CHECKPOINT
|
| 27 |
+
pipeline_config: Path = DEFAULT_SAM3D_PIPELINE
|
| 28 |
+
minimum_vram_gb: float = 32.0
|
| 29 |
+
memory_strategy: Sam3DMemoryStrategy = "single_gpu"
|
| 30 |
+
stage_gpu_ids: tuple[int, ...] = ()
|
| 31 |
+
|
| 32 |
+
@classmethod
|
| 33 |
+
def from_env(cls) -> Sam3DSettings:
|
| 34 |
+
command = tuple(shlex.split(os.environ.get("SAM3D_COMMAND", "")))
|
| 35 |
+
minimum_vram_gb = float(os.environ.get("SAM3D_MIN_VRAM_GB", "32"))
|
| 36 |
+
if minimum_vram_gb <= 0:
|
| 37 |
+
raise ValueError("SAM3D_MIN_VRAM_GB must be positive")
|
| 38 |
+
memory_strategy = os.environ.get("SAM3D_MEMORY_STRATEGY", "single_gpu")
|
| 39 |
+
if memory_strategy not in {"single_gpu", "staged_process", "fsdp"}:
|
| 40 |
+
raise ValueError("SAM3D_MEMORY_STRATEGY must be single_gpu, staged_process, or fsdp")
|
| 41 |
+
stage_gpu_ids = tuple(
|
| 42 |
+
int(item) for item in os.environ.get("SAM3D_STAGE_GPU_IDS", "").split(",") if item
|
| 43 |
+
)
|
| 44 |
+
return cls(
|
| 45 |
+
command=command,
|
| 46 |
+
sam3_checkpoint=Path(os.environ.get("SAM3_CHECKPOINT", str(DEFAULT_SAM3_CHECKPOINT))),
|
| 47 |
+
pipeline_config=Path(
|
| 48 |
+
os.environ.get("SAM3D_PIPELINE_CONFIG", str(DEFAULT_SAM3D_PIPELINE))
|
| 49 |
+
),
|
| 50 |
+
minimum_vram_gb=minimum_vram_gb,
|
| 51 |
+
memory_strategy=memory_strategy, # type: ignore[arg-type]
|
| 52 |
+
stage_gpu_ids=stage_gpu_ids,
|
| 53 |
+
)
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
def query_gpus() -> list[GpuInfo]:
|
| 57 |
+
if os.environ.get("RHG_CPU_ONLY") == "1" or shutil.which("nvidia-smi") is None:
|
| 58 |
+
return []
|
| 59 |
+
result = subprocess.run(
|
| 60 |
+
[
|
| 61 |
+
"nvidia-smi",
|
| 62 |
+
"--query-gpu=index,name,memory.total,memory.used,memory.free,utilization.gpu",
|
| 63 |
+
"--format=csv,noheader,nounits",
|
| 64 |
+
],
|
| 65 |
+
check=False,
|
| 66 |
+
capture_output=True,
|
| 67 |
+
text=True,
|
| 68 |
+
)
|
| 69 |
+
if result.returncode:
|
| 70 |
+
return []
|
| 71 |
+
return parse_nvidia_smi(result.stdout)
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
def probe_sam3d(settings: Sam3DSettings | None = None) -> dict[str, object]:
|
| 75 |
+
settings = settings or Sam3DSettings.from_env()
|
| 76 |
+
gpus = query_gpus()
|
| 77 |
+
minimum_vram_mb = int(settings.minimum_vram_gb * 1024)
|
| 78 |
+
capable_gpus = [gpu.index for gpu in gpus if gpu.memory_total_mb >= minimum_vram_mb]
|
| 79 |
+
strategy_supported = settings.memory_strategy != "fsdp"
|
| 80 |
+
if settings.memory_strategy == "staged_process":
|
| 81 |
+
# Process isolation removes the simultaneous SAM3 + SAM3D residency. The
|
| 82 |
+
# reconstruction peak is still determined by the upstream SAM3D pipeline.
|
| 83 |
+
capable_gpus = [gpu.index for gpu in gpus if gpu.memory_total_mb >= 23 * 1024]
|
| 84 |
+
checkpoints_ready = settings.sam3_checkpoint.is_file() and settings.pipeline_config.is_file()
|
| 85 |
+
return {
|
| 86 |
+
"configured": bool(settings.command),
|
| 87 |
+
"ready": (
|
| 88 |
+
bool(settings.command)
|
| 89 |
+
and checkpoints_ready
|
| 90 |
+
and bool(capable_gpus)
|
| 91 |
+
and strategy_supported
|
| 92 |
+
),
|
| 93 |
+
"command_configured": bool(settings.command),
|
| 94 |
+
"sam3_checkpoint": str(settings.sam3_checkpoint),
|
| 95 |
+
"sam3_checkpoint_ready": settings.sam3_checkpoint.is_file(),
|
| 96 |
+
"pipeline_config": str(settings.pipeline_config),
|
| 97 |
+
"pipeline_config_ready": settings.pipeline_config.is_file(),
|
| 98 |
+
"minimum_vram_gb": settings.minimum_vram_gb,
|
| 99 |
+
"memory_strategy": settings.memory_strategy,
|
| 100 |
+
"strategy_supported": strategy_supported,
|
| 101 |
+
"strategy_note": (
|
| 102 |
+
"FSDP is not supported by the upstream single-process sparse inference pipeline"
|
| 103 |
+
if settings.memory_strategy == "fsdp"
|
| 104 |
+
else "SAM3 and SAM3D run in isolated processes"
|
| 105 |
+
if settings.memory_strategy == "staged_process"
|
| 106 |
+
else "upstream single-GPU execution"
|
| 107 |
+
),
|
| 108 |
+
"stage_gpu_ids": list(settings.stage_gpu_ids),
|
| 109 |
+
"capable_gpu_ids": capable_gpus,
|
| 110 |
+
"detected_gpu_vram_gb": [round(gpu.memory_total_mb / 1024, 2) for gpu in gpus],
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
class Sam3DAdapter:
|
| 115 |
+
"""File-protocol adapter for SAM 3D Objects in an isolated CUDA environment."""
|
| 116 |
+
|
| 117 |
+
def __init__(self, settings: Sam3DSettings | None = None) -> None:
|
| 118 |
+
self.settings = settings or Sam3DSettings.from_env()
|
| 119 |
+
|
| 120 |
+
def generate(
|
| 121 |
+
self,
|
| 122 |
+
image: Path,
|
| 123 |
+
output_dir: Path,
|
| 124 |
+
*,
|
| 125 |
+
prompt: str | None = None,
|
| 126 |
+
mask: Path | None = None,
|
| 127 |
+
seed: int = 42,
|
| 128 |
+
) -> Path:
|
| 129 |
+
if not image.is_file():
|
| 130 |
+
raise FileNotFoundError(image)
|
| 131 |
+
if mask is not None and not mask.is_file():
|
| 132 |
+
raise FileNotFoundError(mask)
|
| 133 |
+
status = probe_sam3d(self.settings)
|
| 134 |
+
if not self.settings.command:
|
| 135 |
+
raise NotConfiguredError("SAM3D_COMMAND is not configured")
|
| 136 |
+
if not self.settings.sam3_checkpoint.is_file():
|
| 137 |
+
raise NotConfiguredError(f"SAM3 checkpoint not found: {self.settings.sam3_checkpoint}")
|
| 138 |
+
if not self.settings.pipeline_config.is_file():
|
| 139 |
+
raise NotConfiguredError(
|
| 140 |
+
f"SAM 3D Objects pipeline config not found: {self.settings.pipeline_config}"
|
| 141 |
+
)
|
| 142 |
+
if not status["capable_gpu_ids"]:
|
| 143 |
+
raise RuntimeError(
|
| 144 |
+
f"SAM3D requires a GPU with at least {self.settings.minimum_vram_gb:g} GB VRAM; "
|
| 145 |
+
f"detected {status['detected_gpu_vram_gb']} GB"
|
| 146 |
+
)
|
| 147 |
+
if not status["strategy_supported"]:
|
| 148 |
+
raise RuntimeError(str(status["strategy_note"]))
|
| 149 |
+
|
| 150 |
+
output_dir.mkdir(parents=True, exist_ok=True)
|
| 151 |
+
request_path = output_dir / "sam3d_request.json"
|
| 152 |
+
manifest_path = output_dir / "sam3d_manifest.json"
|
| 153 |
+
request = {
|
| 154 |
+
"schema_version": "1.0",
|
| 155 |
+
"image": str(image.resolve()),
|
| 156 |
+
"mask": str(mask.resolve()) if mask is not None else None,
|
| 157 |
+
"prompt": prompt,
|
| 158 |
+
"seed": seed,
|
| 159 |
+
"sam3_checkpoint": str(self.settings.sam3_checkpoint.resolve()),
|
| 160 |
+
"pipeline_config": str(self.settings.pipeline_config.resolve()),
|
| 161 |
+
"memory_strategy": self.settings.memory_strategy,
|
| 162 |
+
}
|
| 163 |
+
atomic_write_text(request_path, json.dumps(request, indent=2, sort_keys=True) + "\n")
|
| 164 |
+
stages = (
|
| 165 |
+
("mask", "reconstruct")
|
| 166 |
+
if self.settings.memory_strategy == "staged_process"
|
| 167 |
+
else ("full",)
|
| 168 |
+
)
|
| 169 |
+
for index, stage in enumerate(stages):
|
| 170 |
+
environment = os.environ.copy()
|
| 171 |
+
if self.settings.stage_gpu_ids:
|
| 172 |
+
environment["CUDA_VISIBLE_DEVICES"] = str(
|
| 173 |
+
self.settings.stage_gpu_ids[min(index, len(self.settings.stage_gpu_ids) - 1)]
|
| 174 |
+
)
|
| 175 |
+
environment.setdefault("PYTORCH_CUDA_ALLOC_CONF", "expandable_segments:True")
|
| 176 |
+
command = [
|
| 177 |
+
*self.settings.command,
|
| 178 |
+
"--request",
|
| 179 |
+
str(request_path),
|
| 180 |
+
"--output",
|
| 181 |
+
str(output_dir),
|
| 182 |
+
]
|
| 183 |
+
if self.settings.memory_strategy == "staged_process":
|
| 184 |
+
command.extend(("--stage", stage))
|
| 185 |
+
result = subprocess.run(
|
| 186 |
+
command,
|
| 187 |
+
check=False,
|
| 188 |
+
capture_output=True,
|
| 189 |
+
text=True,
|
| 190 |
+
env=environment,
|
| 191 |
+
)
|
| 192 |
+
if result.returncode:
|
| 193 |
+
details = (result.stdout + "\n" + result.stderr)[-2000:]
|
| 194 |
+
raise RuntimeError(
|
| 195 |
+
f"SAM3D {stage} worker failed ({result.returncode}): {details}"
|
| 196 |
+
)
|
| 197 |
+
if not manifest_path.is_file():
|
| 198 |
+
raise RuntimeError("SAM3D worker did not produce sam3d_manifest.json")
|
| 199 |
+
json.loads(manifest_path.read_text(encoding="utf-8"))
|
| 200 |
+
return manifest_path
|
docs/reproduction/public_conversion_code/packages/adapters/scenesmith.py
ADDED
|
@@ -0,0 +1,366 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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 7 |
+
import signal
|
| 8 |
+
import subprocess
|
| 9 |
+
import threading
|
| 10 |
+
from dataclasses import dataclass
|
| 11 |
+
from pathlib import Path
|
| 12 |
+
from typing import Any, Literal
|
| 13 |
+
|
| 14 |
+
from pydantic import BaseModel, ConfigDict, Field, model_validator
|
| 15 |
+
|
| 16 |
+
from packages.adapters.protocols import NotConfiguredError
|
| 17 |
+
from packages.core.files import atomic_write_text
|
| 18 |
+
|
| 19 |
+
SCENESMITH_COMMIT = "67cc408fd38334b4a926efef45e284302ed5055b"
|
| 20 |
+
DEFAULT_ASSET_CATALOG = Path(
|
| 21 |
+
"/data/wyc/RoboHouseGenData/assets/high_quality/retrieval_catalog.json"
|
| 22 |
+
)
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
def _terminate_process_group(process: subprocess.Popen[str], grace_s: float = 10.0) -> None:
|
| 26 |
+
if process.poll() is not None:
|
| 27 |
+
return
|
| 28 |
+
try:
|
| 29 |
+
os.killpg(process.pid, signal.SIGTERM)
|
| 30 |
+
except ProcessLookupError:
|
| 31 |
+
return
|
| 32 |
+
try:
|
| 33 |
+
process.wait(timeout=grace_s)
|
| 34 |
+
except subprocess.TimeoutExpired:
|
| 35 |
+
try:
|
| 36 |
+
os.killpg(process.pid, signal.SIGKILL)
|
| 37 |
+
except ProcessLookupError:
|
| 38 |
+
pass
|
| 39 |
+
process.wait()
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
def _run_isolated(command: list[str], timeout_s: int) -> subprocess.CompletedProcess[str]:
|
| 43 |
+
"""Run a backend in its own process group and reap it on interruption."""
|
| 44 |
+
|
| 45 |
+
process = subprocess.Popen(
|
| 46 |
+
command,
|
| 47 |
+
stdout=subprocess.PIPE,
|
| 48 |
+
stderr=subprocess.PIPE,
|
| 49 |
+
text=True,
|
| 50 |
+
start_new_session=True,
|
| 51 |
+
)
|
| 52 |
+
previous_handlers: dict[int, Any] = {}
|
| 53 |
+
install_handlers = threading.current_thread() is threading.main_thread()
|
| 54 |
+
|
| 55 |
+
def interrupt(signum: int, _frame: object) -> None:
|
| 56 |
+
if signum == signal.SIGINT:
|
| 57 |
+
raise KeyboardInterrupt
|
| 58 |
+
raise SystemExit(128 + signum)
|
| 59 |
+
|
| 60 |
+
if install_handlers:
|
| 61 |
+
for signum in (signal.SIGINT, signal.SIGTERM):
|
| 62 |
+
previous_handlers[signum] = signal.signal(signum, interrupt)
|
| 63 |
+
try:
|
| 64 |
+
stdout, stderr = process.communicate(timeout=timeout_s)
|
| 65 |
+
except BaseException:
|
| 66 |
+
_terminate_process_group(process)
|
| 67 |
+
raise
|
| 68 |
+
finally:
|
| 69 |
+
for signum, handler in previous_handlers.items():
|
| 70 |
+
signal.signal(signum, handler)
|
| 71 |
+
return subprocess.CompletedProcess(command, process.returncode, stdout, stderr)
|
| 72 |
+
|
| 73 |
+
RoboLabPredicateType = Literal[
|
| 74 |
+
"place-on-base",
|
| 75 |
+
"left-of",
|
| 76 |
+
"right-of",
|
| 77 |
+
"front-of",
|
| 78 |
+
"back-of",
|
| 79 |
+
"random-rot",
|
| 80 |
+
"facing-left",
|
| 81 |
+
"facing-right",
|
| 82 |
+
"facing-front",
|
| 83 |
+
"facing-back",
|
| 84 |
+
"align-left",
|
| 85 |
+
"align-right",
|
| 86 |
+
"align-front",
|
| 87 |
+
"align-back",
|
| 88 |
+
"align-center-lr",
|
| 89 |
+
"align-center-fb",
|
| 90 |
+
"place-on",
|
| 91 |
+
"place-in",
|
| 92 |
+
"place-anywhere",
|
| 93 |
+
]
|
| 94 |
+
|
| 95 |
+
|
| 96 |
+
class RoboLabSceneObject(BaseModel):
|
| 97 |
+
model_config = ConfigDict(extra="forbid")
|
| 98 |
+
name: str = Field(min_length=1)
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
class RoboLabScenePredicate(BaseModel):
|
| 102 |
+
"""Wire-compatible predicate accepted by RoboLab robolab-scenegen."""
|
| 103 |
+
|
| 104 |
+
model_config = ConfigDict(extra="forbid")
|
| 105 |
+
type: RoboLabPredicateType
|
| 106 |
+
object: str | None = None
|
| 107 |
+
objects: list[str] | None = None
|
| 108 |
+
reference: str | None = None
|
| 109 |
+
support: str | None = None
|
| 110 |
+
container: str | None = None
|
| 111 |
+
x: float | None = None
|
| 112 |
+
y: float | None = None
|
| 113 |
+
yaw: float | None = None
|
| 114 |
+
distance: float | None = Field(default=None, gt=0)
|
| 115 |
+
support_ratio: float | None = Field(default=None, gt=0, le=1)
|
| 116 |
+
stability: Literal["stable", "unstable", "neutral"] | None = None
|
| 117 |
+
position: str | None = None
|
| 118 |
+
shelf_level: int | None = Field(default=None, ge=0)
|
| 119 |
+
|
| 120 |
+
@model_validator(mode="after")
|
| 121 |
+
def validate_shape(self) -> RoboLabScenePredicate:
|
| 122 |
+
if self.type == "place-in":
|
| 123 |
+
if not self.objects or not self.container:
|
| 124 |
+
raise ValueError("place-in requires objects and container")
|
| 125 |
+
elif not self.object:
|
| 126 |
+
raise ValueError(f"{self.type} requires object")
|
| 127 |
+
if (
|
| 128 |
+
self.type
|
| 129 |
+
in {
|
| 130 |
+
"left-of",
|
| 131 |
+
"right-of",
|
| 132 |
+
"front-of",
|
| 133 |
+
"back-of",
|
| 134 |
+
"align-left",
|
| 135 |
+
"align-right",
|
| 136 |
+
"align-front",
|
| 137 |
+
"align-back",
|
| 138 |
+
"align-center-lr",
|
| 139 |
+
"align-center-fb",
|
| 140 |
+
}
|
| 141 |
+
and not self.reference
|
| 142 |
+
):
|
| 143 |
+
raise ValueError(f"{self.type} requires reference")
|
| 144 |
+
if self.type == "place-on" and not self.support:
|
| 145 |
+
raise ValueError("place-on requires support")
|
| 146 |
+
return self
|
| 147 |
+
|
| 148 |
+
def referenced_objects(self) -> set[str]:
|
| 149 |
+
values = [self.object, self.reference, self.support, self.container, *(self.objects or [])]
|
| 150 |
+
return {value for value in values if value}
|
| 151 |
+
|
| 152 |
+
def target_objects(self) -> set[str]:
|
| 153 |
+
return set(self.objects or []) if self.type == "place-in" else {self.object or ""}
|
| 154 |
+
|
| 155 |
+
|
| 156 |
+
class RoboLabSceneRequest(BaseModel):
|
| 157 |
+
"""Exact top-level RoboLab scene-gen request: objects plus predicates."""
|
| 158 |
+
|
| 159 |
+
model_config = ConfigDict(extra="forbid")
|
| 160 |
+
objects: list[RoboLabSceneObject] = Field(min_length=1)
|
| 161 |
+
predicates: list[RoboLabScenePredicate] = Field(min_length=1)
|
| 162 |
+
|
| 163 |
+
@model_validator(mode="after")
|
| 164 |
+
def validate_references(self) -> RoboLabSceneRequest:
|
| 165 |
+
names = [item.name for item in self.objects]
|
| 166 |
+
if len(names) != len(set(names)):
|
| 167 |
+
raise ValueError("scene object names must be unique")
|
| 168 |
+
known = set(names)
|
| 169 |
+
referenced = set().union(*(item.referenced_objects() for item in self.predicates))
|
| 170 |
+
if unknown := referenced - known:
|
| 171 |
+
raise ValueError(f"predicates reference unknown objects: {sorted(unknown)}")
|
| 172 |
+
targeted = set().union(*(item.target_objects() for item in self.predicates))
|
| 173 |
+
if missing := known - targeted:
|
| 174 |
+
raise ValueError(f"objects have no placement predicate: {sorted(missing)}")
|
| 175 |
+
return self
|
| 176 |
+
|
| 177 |
+
@classmethod
|
| 178 |
+
def model_validate_robolab(cls, value: dict[str, Any]) -> RoboLabSceneRequest:
|
| 179 |
+
return cls.model_validate(value)
|
| 180 |
+
|
| 181 |
+
|
| 182 |
+
@dataclass(frozen=True, slots=True)
|
| 183 |
+
class SceneSmithSettings:
|
| 184 |
+
command: tuple[str, ...]
|
| 185 |
+
asset_catalog: Path = DEFAULT_ASSET_CATALOG
|
| 186 |
+
asset_index: Path | None = None
|
| 187 |
+
timeout_s: int = 14_400
|
| 188 |
+
required: bool = False
|
| 189 |
+
|
| 190 |
+
@classmethod
|
| 191 |
+
def from_env(cls) -> SceneSmithSettings:
|
| 192 |
+
command = tuple(shlex.split(os.environ.get("SCENESMITH_COMMAND", "")))
|
| 193 |
+
timeout_s = int(os.environ.get("SCENESMITH_TIMEOUT_S", "14400"))
|
| 194 |
+
if timeout_s <= 0:
|
| 195 |
+
raise ValueError("SCENESMITH_TIMEOUT_S must be positive")
|
| 196 |
+
return cls(
|
| 197 |
+
command=command,
|
| 198 |
+
asset_catalog=Path(
|
| 199 |
+
os.environ.get("SCENESMITH_ASSET_CATALOG", str(DEFAULT_ASSET_CATALOG))
|
| 200 |
+
),
|
| 201 |
+
asset_index=(
|
| 202 |
+
Path(os.environ["RHG_ASSET_INDEX"]) if os.environ.get("RHG_ASSET_INDEX") else None
|
| 203 |
+
),
|
| 204 |
+
timeout_s=timeout_s,
|
| 205 |
+
required=os.environ.get("SCENESMITH_REQUIRED", "0").casefold() in {"1", "true", "yes"},
|
| 206 |
+
)
|
| 207 |
+
|
| 208 |
+
|
| 209 |
+
def probe_scenesmith(settings: SceneSmithSettings | None = None) -> dict[str, object]:
|
| 210 |
+
settings = settings or SceneSmithSettings.from_env()
|
| 211 |
+
executable = settings.command[0] if settings.command else ""
|
| 212 |
+
executable_ready = bool(executable) and (
|
| 213 |
+
Path(executable).is_file() or shutil.which(executable) is not None
|
| 214 |
+
)
|
| 215 |
+
runtime_assets: dict[str, bool] = {}
|
| 216 |
+
if "--upstream-root" in settings.command:
|
| 217 |
+
index = settings.command.index("--upstream-root")
|
| 218 |
+
if index + 1 < len(settings.command):
|
| 219 |
+
root = Path(settings.command[index + 1])
|
| 220 |
+
runtime_assets = {
|
| 221 |
+
"hssd_models": (root / "data" / "hssd-models" / "objects").is_dir(),
|
| 222 |
+
"hssd_support_surfaces": (
|
| 223 |
+
root / "data" / "hssd-models" / "support-surfaces"
|
| 224 |
+
).is_dir(),
|
| 225 |
+
"hssd_index": (
|
| 226 |
+
root / "data" / "preprocessed" / "hssd_wnsynsetkey_index.json"
|
| 227 |
+
).is_file(),
|
| 228 |
+
"hssd_embeddings": (
|
| 229 |
+
root / "data" / "preprocessed" / "clip_hssd_embeddings.npy"
|
| 230 |
+
).is_file(),
|
| 231 |
+
"material_embeddings": (
|
| 232 |
+
root / "data" / "materials" / "embeddings" / "clip_embeddings.npy"
|
| 233 |
+
).is_file(),
|
| 234 |
+
"material_index": (
|
| 235 |
+
root / "data" / "materials" / "embeddings" / "embedding_index.yaml"
|
| 236 |
+
).is_file(),
|
| 237 |
+
"material_metadata": (
|
| 238 |
+
root / "data" / "materials" / "embeddings" / "metadata_index.yaml"
|
| 239 |
+
).is_file(),
|
| 240 |
+
}
|
| 241 |
+
runtime_ready = all(runtime_assets.values()) if runtime_assets else True
|
| 242 |
+
return {
|
| 243 |
+
"configured": bool(settings.command),
|
| 244 |
+
"ready": executable_ready
|
| 245 |
+
and (
|
| 246 |
+
settings.asset_index is not None
|
| 247 |
+
and settings.asset_index.is_file()
|
| 248 |
+
or settings.asset_catalog.is_file()
|
| 249 |
+
)
|
| 250 |
+
and runtime_ready,
|
| 251 |
+
"command": list(settings.command),
|
| 252 |
+
"command_ready": executable_ready,
|
| 253 |
+
"asset_catalog": str(settings.asset_catalog),
|
| 254 |
+
"asset_catalog_ready": settings.asset_catalog.is_file(),
|
| 255 |
+
"asset_index": str(settings.asset_index) if settings.asset_index else None,
|
| 256 |
+
"asset_index_ready": bool(settings.asset_index and settings.asset_index.is_file()),
|
| 257 |
+
"runtime_assets": runtime_assets,
|
| 258 |
+
"runtime_assets_ready": runtime_ready,
|
| 259 |
+
"required": settings.required,
|
| 260 |
+
"timeout_s": settings.timeout_s,
|
| 261 |
+
"commit": SCENESMITH_COMMIT,
|
| 262 |
+
}
|
| 263 |
+
|
| 264 |
+
|
| 265 |
+
class SceneSmithAdapter:
|
| 266 |
+
"""RoboLab scene-gen compatible input adapter for isolated SceneSmith."""
|
| 267 |
+
|
| 268 |
+
def __init__(
|
| 269 |
+
self,
|
| 270 |
+
command: list[str] | tuple[str, ...] | None = None,
|
| 271 |
+
asset_catalog: Path | None = None,
|
| 272 |
+
asset_index: Path | None = None,
|
| 273 |
+
timeout_s: int | None = None,
|
| 274 |
+
) -> None:
|
| 275 |
+
self.asset_catalog: Path | None
|
| 276 |
+
if command is None:
|
| 277 |
+
settings = SceneSmithSettings.from_env()
|
| 278 |
+
self.command = list(settings.command)
|
| 279 |
+
self.asset_catalog = asset_catalog or settings.asset_catalog
|
| 280 |
+
self.asset_index = asset_index or settings.asset_index
|
| 281 |
+
self.timeout_s = timeout_s or settings.timeout_s
|
| 282 |
+
else:
|
| 283 |
+
self.command = list(command)
|
| 284 |
+
self.asset_catalog = asset_catalog
|
| 285 |
+
self.asset_index = asset_index
|
| 286 |
+
self.timeout_s = timeout_s or 14_400
|
| 287 |
+
|
| 288 |
+
def version(self) -> str:
|
| 289 |
+
return SCENESMITH_COMMIT
|
| 290 |
+
|
| 291 |
+
def author(
|
| 292 |
+
self,
|
| 293 |
+
scene: RoboLabSceneRequest,
|
| 294 |
+
output_dir: Path,
|
| 295 |
+
*,
|
| 296 |
+
context: dict[str, Any] | None = None,
|
| 297 |
+
) -> Path:
|
| 298 |
+
if not self.command:
|
| 299 |
+
raise NotConfiguredError("SceneSmith command is not configured")
|
| 300 |
+
fresh_scene = os.environ.get("RHG_FRESH_SCENE", "0").casefold() in {
|
| 301 |
+
"1",
|
| 302 |
+
"true",
|
| 303 |
+
"yes",
|
| 304 |
+
}
|
| 305 |
+
reuse_from = None if fresh_scene else os.environ.get("RHG_SCENESMITH_REUSE_FROM")
|
| 306 |
+
if reuse_from:
|
| 307 |
+
source = Path(reuse_from).resolve()
|
| 308 |
+
if not source.is_dir():
|
| 309 |
+
raise NotADirectoryError(source)
|
| 310 |
+
# A private copy is required because deterministic post-processing
|
| 311 |
+
# rewrites USD/state files. Symlinks or hardlinks would mutate the
|
| 312 |
+
# accepted parent checkpoint. copytree preserves sparse metadata
|
| 313 |
+
# and is local-I/O only (no API/model work).
|
| 314 |
+
shutil.copytree(source, output_dir, dirs_exist_ok=True, symlinks=True)
|
| 315 |
+
output_dir.mkdir(parents=True, exist_ok=True)
|
| 316 |
+
request = output_dir / "scene_request.json"
|
| 317 |
+
atomic_write_text(request, scene.model_dump_json(indent=2, exclude_none=True))
|
| 318 |
+
command = [*self.command, "--request", str(request), "--output", str(output_dir)]
|
| 319 |
+
if os.environ.get("RHG_COMPOSED_PREVIEW", "0").casefold() in {"1", "true", "yes"}:
|
| 320 |
+
# The outer orchestrator renders root.usda after robot composition.
|
| 321 |
+
# Rendering the worker-only scene here would be overwritten and
|
| 322 |
+
# doubles the 96-frame preview cost.
|
| 323 |
+
command.append("--no-preview")
|
| 324 |
+
start_stage = os.environ.get("RHG_SCENESMITH_START_STAGE")
|
| 325 |
+
resume_from = os.environ.get("RHG_SCENESMITH_RESUME_FROM")
|
| 326 |
+
if start_stage:
|
| 327 |
+
command.extend(["--start-stage", start_stage])
|
| 328 |
+
if resume_from:
|
| 329 |
+
command.extend(["--resume-from", resume_from])
|
| 330 |
+
if not fresh_scene and (
|
| 331 |
+
reuse_from or os.environ.get("RHG_SCENESMITH_REUSE_UPSTREAM", "0").casefold() in {
|
| 332 |
+
"1",
|
| 333 |
+
"true",
|
| 334 |
+
"yes",
|
| 335 |
+
}
|
| 336 |
+
):
|
| 337 |
+
command.append("--reuse-upstream")
|
| 338 |
+
if context is not None:
|
| 339 |
+
context_path = output_dir / "scene_context.json"
|
| 340 |
+
atomic_write_text(context_path, json.dumps(context, indent=2, sort_keys=True))
|
| 341 |
+
command.extend(["--context", str(context_path)])
|
| 342 |
+
if self.asset_index is not None:
|
| 343 |
+
if not self.asset_index.is_file():
|
| 344 |
+
raise FileNotFoundError(self.asset_index)
|
| 345 |
+
command.extend(["--asset-index", str(self.asset_index.resolve())])
|
| 346 |
+
elif self.asset_catalog is not None:
|
| 347 |
+
if not self.asset_catalog.is_file():
|
| 348 |
+
raise FileNotFoundError(self.asset_catalog)
|
| 349 |
+
command.extend(["--asset-catalog", str(self.asset_catalog.resolve())])
|
| 350 |
+
result = _run_isolated(command, self.timeout_s)
|
| 351 |
+
if (
|
| 352 |
+
result.returncode != 0
|
| 353 |
+
and "--no-preview" in command
|
| 354 |
+
and "unrecognized arguments: --no-preview" in result.stderr
|
| 355 |
+
):
|
| 356 |
+
# ``RHG_COMPOSED_PREVIEW`` is an execution optimization, not part of
|
| 357 |
+
# the public worker contract. Older/custom workers must remain valid.
|
| 358 |
+
command.remove("--no-preview")
|
| 359 |
+
result = _run_isolated(command, self.timeout_s)
|
| 360 |
+
manifest = output_dir / "stage_manifest.json"
|
| 361 |
+
if result.returncode != 0:
|
| 362 |
+
raise RuntimeError(f"SceneSmith failed ({result.returncode}): {result.stderr[-2000:]}")
|
| 363 |
+
if not manifest.exists():
|
| 364 |
+
raise RuntimeError("SceneSmith did not produce stage_manifest.json")
|
| 365 |
+
json.loads(manifest.read_text(encoding="utf-8"))
|
| 366 |
+
return manifest
|
docs/reproduction/public_conversion_code/packages/adapters/source_device.py
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Reserve one currently idle local GPU for a source Blender conversion."""
|
| 2 |
+
from contextlib import contextmanager
|
| 3 |
+
from pathlib import Path
|
| 4 |
+
import fcntl,os,subprocess,tempfile
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
@contextmanager
|
| 8 |
+
def blender_environment(output,requested=None):
|
| 9 |
+
result=subprocess.run(['nvidia-smi','--query-gpu=index,uuid,memory.used','--format=csv,noheader,nounits'],capture_output=True,text=True,timeout=20)
|
| 10 |
+
devices=[]
|
| 11 |
+
for line in result.stdout.splitlines():
|
| 12 |
+
fields=[v.strip() for v in line.split(',')]
|
| 13 |
+
if len(fields)!=3 or not fields[0].isdigit():continue
|
| 14 |
+
index,uuid,used=fields
|
| 15 |
+
if requested and requested not in (index,uuid):continue
|
| 16 |
+
if float(used)<200:devices.append((index,uuid))
|
| 17 |
+
for index,uuid in devices:
|
| 18 |
+
lock=open(Path(tempfile.gettempdir())/('rhg-source-'+uuid+'.lock'),'a+')
|
| 19 |
+
try:
|
| 20 |
+
fcntl.flock(lock,fcntl.LOCK_EX|fcntl.LOCK_NB)
|
| 21 |
+
except BlockingIOError:
|
| 22 |
+
lock.close();continue
|
| 23 |
+
try:
|
| 24 |
+
used=float(subprocess.check_output(['nvidia-smi','-i',uuid,'--query-gpu=memory.used','--format=csv,noheader,nounits'],text=True,timeout=20))
|
| 25 |
+
if used>=200:continue
|
| 26 |
+
cache=Path(output)/'source-blender-cache';cache.mkdir(exist_ok=False)
|
| 27 |
+
yield dict(os.environ,CUDA_VISIBLE_DEVICES=uuid,OMP_NUM_THREADS='2',OPENBLAS_NUM_THREADS='1',XDG_CACHE_HOME=str(cache))
|
| 28 |
+
return
|
| 29 |
+
finally:
|
| 30 |
+
lock.close()
|
| 31 |
+
raise RuntimeError('No idle local GPU for source Blender rendering/baking; queue on an available worker')
|
docs/reproduction/public_conversion_code/packages/adapters/texture_compression.py
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""RHG-side DDS color conversion, before package sealing or installation."""
|
| 2 |
+
import json
|
| 3 |
+
from pathlib import Path
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
def _hdr_dimensions(path):
|
| 7 |
+
import re
|
| 8 |
+
import struct
|
| 9 |
+
if path.suffix.lower() == '.hdr':
|
| 10 |
+
with path.open('rb') as stream:
|
| 11 |
+
header = stream.read(65536)
|
| 12 |
+
match = re.search(rb'([+-][XY])\s+(\d+)\s+([+-][XY])\s+(\d+)', header)
|
| 13 |
+
if not match:
|
| 14 |
+
raise ValueError('Missing Radiance HDR dimensions: ' + str(path))
|
| 15 |
+
axes = {match[1][-1:]: int(match[2]), match[3][-1:]: int(match[4])}
|
| 16 |
+
return axes[b'X'], axes[b'Y']
|
| 17 |
+
with path.open('rb') as stream:
|
| 18 |
+
if stream.read(4) != b'\x76\x2f\x31\x01':
|
| 19 |
+
raise ValueError('Invalid OpenEXR magic: ' + str(path))
|
| 20 |
+
stream.read(4)
|
| 21 |
+
def cstring():
|
| 22 |
+
result = bytearray()
|
| 23 |
+
while True:
|
| 24 |
+
char = stream.read(1)
|
| 25 |
+
if not char:
|
| 26 |
+
raise ValueError('Truncated OpenEXR header')
|
| 27 |
+
if char == b'\0':
|
| 28 |
+
return bytes(result)
|
| 29 |
+
result.extend(char)
|
| 30 |
+
if len(result) > 4096:
|
| 31 |
+
raise ValueError('Invalid OpenEXR attribute name')
|
| 32 |
+
while True:
|
| 33 |
+
name = cstring()
|
| 34 |
+
if not name:
|
| 35 |
+
break
|
| 36 |
+
kind = cstring()
|
| 37 |
+
size = struct.unpack('<I', stream.read(4))[0]
|
| 38 |
+
if size > 16 * 1024**2:
|
| 39 |
+
raise ValueError('Oversized OpenEXR header attribute')
|
| 40 |
+
value = stream.read(size)
|
| 41 |
+
if name == b'dataWindow' and kind == b'box2i' and size == 16:
|
| 42 |
+
xmin, ymin, xmax, ymax = struct.unpack('<4i', value)
|
| 43 |
+
return xmax - xmin + 1, ymax - ymin + 1
|
| 44 |
+
raise ValueError('Missing OpenEXR data window: ' + str(path))
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
def _encode_asset(job):
|
| 48 |
+
import hashlib
|
| 49 |
+
import os
|
| 50 |
+
import sys
|
| 51 |
+
import PIL
|
| 52 |
+
from PIL import Image
|
| 53 |
+
from .rparena_v16 import sha, intern
|
| 54 |
+
sys.path.insert(0, str(Path(__file__).resolve().parents[2] / 'scripts/source_transfer'))
|
| 55 |
+
source_name, space, policy, package_name, shared_name = job
|
| 56 |
+
source, package, shared = map(Path, (source_name, package_name, shared_name))
|
| 57 |
+
with Image.open(source) as header:
|
| 58 |
+
width, height = header.size
|
| 59 |
+
requested_color = space == 'sRGB' and policy == 'bc7'
|
| 60 |
+
# Isaac 6.0.1 rejects BC textures whose base dimensions are not multiples
|
| 61 |
+
# of four, even though a general DDS decoder can read the padded blocks.
|
| 62 |
+
color = requested_color and width % 4 == 0 and height % 4 == 0
|
| 63 |
+
cache_policy = 'png-unaligned-bc7-fallback' if requested_color and not color else policy
|
| 64 |
+
suffix = '.dds' if color else '.png'
|
| 65 |
+
source_digest = sha(source)
|
| 66 |
+
encoder = Path(__file__).resolve().parents[2] / 'scripts/source_transfer/dds_textures.py'
|
| 67 |
+
cache_key = hashlib.sha256(json.dumps(dict(source_sha256=source_digest, space=space,
|
| 68 |
+
policy=cache_policy, encoder_sha256=sha(encoder), pillow=PIL.__version__), sort_keys=True).encode()).hexdigest()
|
| 69 |
+
index_dir = shared / 'texture-encoding-v1'
|
| 70 |
+
index_dir.mkdir(parents=True, exist_ok=True)
|
| 71 |
+
index = index_dir / (cache_key + '.json')
|
| 72 |
+
if index.exists():
|
| 73 |
+
cached = json.loads(index.read_text())
|
| 74 |
+
payload = shared / cached['filename']
|
| 75 |
+
if not payload.is_file() or sha(payload) != cached['sha256']:
|
| 76 |
+
raise ValueError('Encoded texture cache hash mismatch: ' + str(index))
|
| 77 |
+
relative = 'assets/' + cached['filename']
|
| 78 |
+
intern(payload, package / relative, payload)
|
| 79 |
+
return relative
|
| 80 |
+
temporary = package / ('resident-' + source_digest + '-' + str(os.getpid()) + suffix)
|
| 81 |
+
with Image.open(source) as image:
|
| 82 |
+
if color:
|
| 83 |
+
from dds_textures import encode
|
| 84 |
+
temporary.write_bytes(encode(image, 'BC7', True))
|
| 85 |
+
else:
|
| 86 |
+
image.save(temporary, format='PNG')
|
| 87 |
+
identity = sha(temporary)
|
| 88 |
+
relative = 'assets/' + identity + suffix
|
| 89 |
+
intern(temporary, package / relative, shared / (identity + suffix))
|
| 90 |
+
temporary.unlink()
|
| 91 |
+
pending = index.with_name(index.name + '.' + str(os.getpid()) + '.tmp')
|
| 92 |
+
pending.write_text(json.dumps(dict(filename=identity + suffix, sha256=identity,
|
| 93 |
+
source_sha256=source_digest), indent=2))
|
| 94 |
+
pending.replace(index)
|
| 95 |
+
return relative
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
def compress_colors(stage, package, shared, policy):
|
| 99 |
+
from pxr import Sdf, UsdShade
|
| 100 |
+
from PIL import Image
|
| 101 |
+
from .rparena_v16 import sha, intern
|
| 102 |
+
if policy == 'preserve':
|
| 103 |
+
return dict(policy=policy, converted=[], normal_format='PNG')
|
| 104 |
+
if policy not in ('bc7', 'png'):
|
| 105 |
+
raise ValueError('Unknown texture compression policy')
|
| 106 |
+
import sys
|
| 107 |
+
sys.path.insert(0, str(Path(__file__).resolve().parents[2] / 'scripts/source_transfer'))
|
| 108 |
+
rows = []
|
| 109 |
+
cache = {}
|
| 110 |
+
plans = []
|
| 111 |
+
for prim in stage.Traverse():
|
| 112 |
+
if not prim.IsA(UsdShade.Shader):
|
| 113 |
+
continue
|
| 114 |
+
shader = UsdShade.Shader(prim)
|
| 115 |
+
for attribute in prim.GetAttributes():
|
| 116 |
+
if attribute.GetTypeName() != Sdf.ValueTypeNames.Asset:
|
| 117 |
+
continue
|
| 118 |
+
value = attribute.Get()
|
| 119 |
+
if value is None or not value.path.lower().endswith('.png'):
|
| 120 |
+
continue
|
| 121 |
+
space = attribute.GetColorSpace()
|
| 122 |
+
color_space = shader.GetInput('sourceColorSpace')
|
| 123 |
+
space = color_space.Get() if color_space else space
|
| 124 |
+
# Never compress scalar/normal maps or infer sRGB from a filename.
|
| 125 |
+
source = (package / value.path).resolve()
|
| 126 |
+
if not source.is_relative_to(package.resolve()):
|
| 127 |
+
raise ValueError('Color asset escapes package')
|
| 128 |
+
cache_key = (source, space)
|
| 129 |
+
if cache_key not in cache:
|
| 130 |
+
cache[cache_key] = None
|
| 131 |
+
plans.append((attribute, value.path, cache_key, str(prim.GetPath())))
|
| 132 |
+
import concurrent.futures
|
| 133 |
+
import multiprocessing
|
| 134 |
+
import os
|
| 135 |
+
workers = max(1, min(8, int(os.environ.get('RHG_TEXTURE_COMPRESSION_WORKERS', '4'))))
|
| 136 |
+
keys = list(cache)
|
| 137 |
+
jobs = [(str(source), space, policy, str(package), str(shared)) for source, space in keys]
|
| 138 |
+
# Spawn independent CPU encoders; never fork an initialized USD thread pool.
|
| 139 |
+
with concurrent.futures.ProcessPoolExecutor(max_workers=workers, mp_context=multiprocessing.get_context('spawn')) as pool:
|
| 140 |
+
for index, (key, relative) in enumerate(zip(keys, pool.map(_encode_asset, jobs))):
|
| 141 |
+
cache[key] = relative
|
| 142 |
+
if index % 16 == 0:
|
| 143 |
+
print(json.dumps(dict(texture_encoding_completed=index+1, total=len(keys), workers=workers)), flush=True)
|
| 144 |
+
for attribute, original, cache_key, shader_path in plans:
|
| 145 |
+
relative = cache[cache_key]
|
| 146 |
+
space = cache_key[1]
|
| 147 |
+
attribute.Set(Sdf.AssetPath(relative))
|
| 148 |
+
rows.append(dict(shader=shader_path, input=attribute.GetName(),
|
| 149 |
+
original=original, path=relative, format='DDS BC7 sRGB' if relative.endswith('.dds') else 'PNG8',
|
| 150 |
+
fallback_reason='Isaac BC7 base dimensions must be multiples of 4' if space == 'sRGB' and policy == 'bc7' and relative.endswith('.png') else None,
|
| 151 |
+
mip_chain=relative.endswith('.dds'), sha256=sha(package / relative)))
|
| 152 |
+
# Only remove superseded files in this new, unsealed package. The source
|
| 153 |
+
# bake and content-addressed shared cache remain immutable.
|
| 154 |
+
live = set()
|
| 155 |
+
for prim in stage.Traverse():
|
| 156 |
+
for attribute in prim.GetAttributes():
|
| 157 |
+
if attribute.GetTypeName() == Sdf.ValueTypeNames.Asset:
|
| 158 |
+
value = attribute.Get()
|
| 159 |
+
if value and value.path.startswith('assets/'):
|
| 160 |
+
live.add(value.path)
|
| 161 |
+
removed = []
|
| 162 |
+
for source in {key[0] for key in cache}:
|
| 163 |
+
relative = source.relative_to(package.resolve()).as_posix()
|
| 164 |
+
if relative not in live:
|
| 165 |
+
source.unlink()
|
| 166 |
+
removed.append(relative)
|
| 167 |
+
result = dict(policy=policy, encoder_profile='basic', workers=workers, converted=rows, unique_converted_textures=len(cache),
|
| 168 |
+
removed_superseded_package_files=removed,
|
| 169 |
+
normal_format='PNG',
|
| 170 |
+
normal_fallback_reason='BC5 direct sampling failed the frozen 5/255 native USD/RTX probe; no implicit Z reconstruction')
|
| 171 |
+
from texture_budget import mip_bytes
|
| 172 |
+
ledger = []
|
| 173 |
+
for relative in sorted(live):
|
| 174 |
+
path = package / relative
|
| 175 |
+
if path.suffix.lower() not in ('.png', '.dds', '.jpg', '.jpeg', '.exr', '.hdr'):
|
| 176 |
+
continue
|
| 177 |
+
if path.suffix.lower() in ('.exr', '.hdr'):
|
| 178 |
+
size = _hdr_dimensions(path)
|
| 179 |
+
fmt = 'HDR unchanged; RGBA32F reserve'
|
| 180 |
+
resident = 4 * mip_bytes(*size)
|
| 181 |
+
else:
|
| 182 |
+
image = Image.open(path)
|
| 183 |
+
size = image.size
|
| 184 |
+
fmt = 'BC7' if path.suffix.lower() == '.dds' else 'PNG'
|
| 185 |
+
resident = mip_bytes(*size, fmt)
|
| 186 |
+
if min(size) <= 0:
|
| 187 |
+
raise ValueError('Invalid delivered texture dimensions: ' + str(path))
|
| 188 |
+
ledger.append(dict(path=relative, resolution=list(size), format=fmt,
|
| 189 |
+
estimated_resident_bytes=resident,
|
| 190 |
+
file_bytes=path.stat().st_size, sha256=sha(path)))
|
| 191 |
+
budget_path = package / 'texture-budget.json'
|
| 192 |
+
if budget_path.exists():
|
| 193 |
+
budget = json.loads(budget_path.read_text())
|
| 194 |
+
budget['source_png_estimated_resident_bytes'] = budget['estimated_resident_bytes']
|
| 195 |
+
budget['estimated_resident_bytes'] = sum(r['estimated_resident_bytes'] for r in ledger)
|
| 196 |
+
budget['delivered_textures'] = ledger
|
| 197 |
+
budget['compression_policy'] = policy
|
| 198 |
+
if budget['estimated_resident_bytes'] > budget['budget_bytes']:
|
| 199 |
+
raise ValueError('Delivered texture allocation exceeds the configured scene budget')
|
| 200 |
+
budget_path.write_text(json.dumps(budget, indent=2))
|
| 201 |
+
result['delivered_estimated_resident_bytes'] = budget['estimated_resident_bytes']
|
| 202 |
+
(package / 'texture-compression.json').write_text(json.dumps(result, indent=2))
|
| 203 |
+
return result
|
docs/reproduction/public_conversion_code/packages/adapters/texture_metrics.py
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Frozen-region texture checks, without registration or exposure fitting."""
|
| 2 |
+
import json
|
| 3 |
+
from pathlib import Path
|
| 4 |
+
import numpy as np
|
| 5 |
+
from PIL import Image
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
CONTRACT = Path(__file__).resolve().parents[2] / 'scripts/source_transfer/texture-fidelity-contract.json'
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
def compare(reference, candidate, view, contract=None):
|
| 12 |
+
contract = contract or json.loads(CONTRACT.read_text(encoding='utf-8'))
|
| 13 |
+
a, b = [np.asarray(Image.open(p).convert('RGB'), dtype=float) for p in (reference, candidate)]
|
| 14 |
+
if a.shape != b.shape or a.shape[:2] != (720, 960):
|
| 15 |
+
raise ValueError('Frozen texture regions require matching 960x720 images')
|
| 16 |
+
limits = contract['thresholds']
|
| 17 |
+
rows = []
|
| 18 |
+
for label, (x0, y0, x1, y1) in contract['regions'][view].items():
|
| 19 |
+
gradients = []
|
| 20 |
+
for image in (a, b):
|
| 21 |
+
lum = image[y0:y1, x0:x1] @ np.array([.2126, .7152, .0722])
|
| 22 |
+
gradients.append(np.stack(((lum[1:-1,2:]-lum[1:-1,:-2])*.5,
|
| 23 |
+
(lum[2:,1:-1]-lum[:-2,1:-1])*.5), axis=-1))
|
| 24 |
+
ga, gb = gradients
|
| 25 |
+
ea, eb = [float(np.mean(g*g)) for g in gradients]
|
| 26 |
+
ratio = eb/ea if ea > 1e-8 else None
|
| 27 |
+
cosine = float(np.mean(ga*gb)/np.sqrt(ea*eb)) if ea*eb > 1e-16 else None
|
| 28 |
+
passed = (ratio is not None and cosine is not None and
|
| 29 |
+
limits['gradient_energy_ratio_min'] <= ratio <= limits['gradient_energy_ratio_max'] and
|
| 30 |
+
cosine >= limits['gradient_cosine_min'])
|
| 31 |
+
rows.append(dict(region=label, box=[x0,y0,x1,y1], reference_energy=ea,
|
| 32 |
+
candidate_energy=eb, gradient_energy_ratio=ratio,
|
| 33 |
+
gradient_cosine=cosine, passed=passed,
|
| 34 |
+
enough_texture_evidence=ratio is not None and cosine is not None))
|
| 35 |
+
return dict(view=view, mae=float(abs(a-b).mean()), regions=rows,
|
| 36 |
+
clarity_passed=bool(rows) and all(r['passed'] for r in rows))
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
def compare_directories(reference, candidate, output, contract=None):
|
| 40 |
+
contract = contract or json.loads(CONTRACT.read_text(encoding='utf-8'))
|
| 41 |
+
rows = [compare(Path(reference)/(v+'.png'), Path(candidate)/(v+'.png'), v, contract)
|
| 42 |
+
for v in contract['regions']]
|
| 43 |
+
result = dict(contract=contract, views=rows,
|
| 44 |
+
clarity_passed=all(r['clarity_passed'] for r in rows),
|
| 45 |
+
mean_error_passed=all(r['mae'] <= contract['thresholds']['full_image_rgb_mae_max'] for r in rows))
|
| 46 |
+
Path(output).write_text(json.dumps(result, indent=2), encoding='utf-8')
|
| 47 |
+
return result
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
if __name__ == '__main__':
|
| 51 |
+
import argparse
|
| 52 |
+
|
| 53 |
+
parser = argparse.ArgumentParser(description='Grade complete frozen render regions without image fitting')
|
| 54 |
+
parser.add_argument('--reference', type=Path, required=True)
|
| 55 |
+
parser.add_argument('--candidate', type=Path, required=True)
|
| 56 |
+
parser.add_argument('--output', type=Path, required=True)
|
| 57 |
+
parser.add_argument('--contract', type=Path, default=CONTRACT)
|
| 58 |
+
args = parser.parse_args()
|
| 59 |
+
if args.output.exists():
|
| 60 |
+
parser.error('Output already exists; retain previous results and choose a new path')
|
| 61 |
+
args.output.parent.mkdir(parents=True, exist_ok=True)
|
| 62 |
+
result = compare_directories(args.reference, args.candidate, args.output,
|
| 63 |
+
json.loads(args.contract.read_text(encoding='utf-8')))
|
| 64 |
+
passed = result['clarity_passed'] and result['mean_error_passed']
|
| 65 |
+
print(json.dumps(dict(passed=passed, views=len(result['views']),
|
| 66 |
+
clarity_passed=result['clarity_passed'],
|
| 67 |
+
mean_error_passed=result['mean_error_passed'])))
|
| 68 |
+
raise SystemExit(0 if passed else 1)
|
docs/reproduction/public_conversion_code/packages/asset_registry/__init__.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing import TYPE_CHECKING, Any
|
| 4 |
+
|
| 5 |
+
if TYPE_CHECKING:
|
| 6 |
+
from packages.asset_registry.models import RoboLabCatalogEntry
|
| 7 |
+
from packages.asset_registry.repository import AssetRegistry
|
| 8 |
+
|
| 9 |
+
__all__ = ["AssetRegistry", "RoboLabCatalogEntry"]
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
def __getattr__(name: str) -> Any:
|
| 13 |
+
if name == "AssetRegistry":
|
| 14 |
+
from packages.asset_registry.repository import AssetRegistry
|
| 15 |
+
|
| 16 |
+
return AssetRegistry
|
| 17 |
+
if name == "RoboLabCatalogEntry":
|
| 18 |
+
from packages.asset_registry.models import RoboLabCatalogEntry
|
| 19 |
+
|
| 20 |
+
return RoboLabCatalogEntry
|
| 21 |
+
raise AttributeError(name)
|
docs/reproduction/public_conversion_code/packages/asset_registry/admission.py
ADDED
|
@@ -0,0 +1,304 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import hashlib
|
| 4 |
+
import re
|
| 5 |
+
from collections import defaultdict
|
| 6 |
+
from pathlib import Path
|
| 7 |
+
|
| 8 |
+
from packages.asset_registry.models import (
|
| 9 |
+
AdmissionStatus,
|
| 10 |
+
AssetKind,
|
| 11 |
+
AssetRecord,
|
| 12 |
+
)
|
| 13 |
+
|
| 14 |
+
GENERIC_NAMES = {"link 0 0", "material", "mesh", "node", "object", "root"}
|
| 15 |
+
OBJECT_SOURCES = {
|
| 16 |
+
"ArtVIP",
|
| 17 |
+
"HSSD",
|
| 18 |
+
"Lightwheel SimReady",
|
| 19 |
+
"ReplicaCAD",
|
| 20 |
+
"Google Scanned Objects",
|
| 21 |
+
"GoogleResearch on Gazebo Fuel",
|
| 22 |
+
"YCB",
|
| 23 |
+
}
|
| 24 |
+
OBJECT_CATEGORIES = {
|
| 25 |
+
"book",
|
| 26 |
+
"bookcase",
|
| 27 |
+
"bottle",
|
| 28 |
+
"bowl",
|
| 29 |
+
"cabinet",
|
| 30 |
+
"chair",
|
| 31 |
+
"computer",
|
| 32 |
+
"cup",
|
| 33 |
+
"desk",
|
| 34 |
+
"faucet",
|
| 35 |
+
"floor lamp",
|
| 36 |
+
"lamp",
|
| 37 |
+
"monitor",
|
| 38 |
+
"mug",
|
| 39 |
+
"oven",
|
| 40 |
+
"plant",
|
| 41 |
+
"potted plant",
|
| 42 |
+
"refrigerator",
|
| 43 |
+
"shelf",
|
| 44 |
+
"sink",
|
| 45 |
+
"sofa",
|
| 46 |
+
"table",
|
| 47 |
+
"television",
|
| 48 |
+
"trash can",
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
def normalize_category(value: str) -> str:
|
| 53 |
+
tokens = re.findall(r"[a-z0-9]+", value.casefold().replace("_", "-"))
|
| 54 |
+
terms = set(tokens)
|
| 55 |
+
if "bottle" in terms or any(
|
| 56 |
+
token.startswith("bottle") or token.endswith("bottle") for token in tokens
|
| 57 |
+
):
|
| 58 |
+
return "bottle"
|
| 59 |
+
if "trash" in terms and terms & {"bin", "can", "dustbin"}:
|
| 60 |
+
return "trash can"
|
| 61 |
+
if "dustbin" in terms:
|
| 62 |
+
return "trash can"
|
| 63 |
+
if "countertop" in terms or "worktop" in terms:
|
| 64 |
+
return "kitchen counter" if "kitchen" in terms or "countertop" in terms else "worktop"
|
| 65 |
+
# Catalogs such as ArtVIP and the H20 qualified overlay often expose a
|
| 66 |
+
# useful class only in the filename/tags while their upstream category is
|
| 67 |
+
# the generic ``articulated object``. Collapse those records to the same
|
| 68 |
+
# compact taxonomy used by task specifications.
|
| 69 |
+
if "pottedplant" in terms or ("potted" in terms and "plant" in terms):
|
| 70 |
+
return "potted plant"
|
| 71 |
+
if "floorlamp" in terms or ("floor" in terms and "lamp" in terms):
|
| 72 |
+
return "floor lamp"
|
| 73 |
+
if terms & {"television", "television003", "tv"}:
|
| 74 |
+
return "television"
|
| 75 |
+
if terms & {"refrigerator", "fridge", "freezer"}:
|
| 76 |
+
return "refrigerator"
|
| 77 |
+
if terms & {"faucet", "spigot"} or "tap" in terms:
|
| 78 |
+
return "faucet"
|
| 79 |
+
if terms & {"oven", "cooktop", "stovetop", "stove", "cooker"}:
|
| 80 |
+
return "oven"
|
| 81 |
+
if terms & {"sink", "basin"}:
|
| 82 |
+
return "sink"
|
| 83 |
+
if terms & {"cabinet", "cabinets", "cupboard", "cupboards"}:
|
| 84 |
+
return "cabinet"
|
| 85 |
+
if "bookcase" in terms or "bookshelf" in terms:
|
| 86 |
+
return "bookcase"
|
| 87 |
+
if (
|
| 88 |
+
"computer" in terms
|
| 89 |
+
or "workstation" in terms
|
| 90 |
+
or any(token.startswith("computer") for token in tokens)
|
| 91 |
+
):
|
| 92 |
+
return "computer"
|
| 93 |
+
if "monitor" in terms or "display" in terms:
|
| 94 |
+
return "monitor"
|
| 95 |
+
if "books" in terms or "book" in terms or any(token.startswith("book") for token in tokens):
|
| 96 |
+
return "book"
|
| 97 |
+
if "shelf" in terms or "shelving" in terms:
|
| 98 |
+
return "shelf"
|
| 99 |
+
if "mug" in terms:
|
| 100 |
+
return "mug"
|
| 101 |
+
if "cup" in terms:
|
| 102 |
+
return "cup"
|
| 103 |
+
if "bowl" in terms:
|
| 104 |
+
return "bowl"
|
| 105 |
+
if "plant" in terms:
|
| 106 |
+
return "plant"
|
| 107 |
+
if "lamp" in terms:
|
| 108 |
+
return "lamp"
|
| 109 |
+
if "desk" in terms or any(token.endswith("desk") for token in tokens):
|
| 110 |
+
return "desk"
|
| 111 |
+
if "chair" in terms or any(token.endswith("chair") for token in tokens):
|
| 112 |
+
return "chair"
|
| 113 |
+
if "sofa" in terms or "couch" in terms:
|
| 114 |
+
return "sofa"
|
| 115 |
+
if "table" in terms:
|
| 116 |
+
return "table"
|
| 117 |
+
return " ".join(tokens)
|
| 118 |
+
|
| 119 |
+
|
| 120 |
+
def canonical_category(record: AssetRecord) -> str:
|
| 121 |
+
return normalize_category(
|
| 122 |
+
" ".join(
|
| 123 |
+
[record.display_name, record.category, *record.tags, *record.synonyms]
|
| 124 |
+
)
|
| 125 |
+
)
|
| 126 |
+
|
| 127 |
+
|
| 128 |
+
def infer_asset_kind(record: AssetRecord) -> AssetKind:
|
| 129 |
+
category = canonical_category(record)
|
| 130 |
+
path = Path(record.usd_path)
|
| 131 |
+
path_text = path.as_posix().casefold()
|
| 132 |
+
source = record.source.casefold()
|
| 133 |
+
h20_namespace = source.split("h20 qualified/", 1)[1] if source.startswith("h20 qualified/") else ""
|
| 134 |
+
# ArtVIP Interactive_scene stores individual props under an explicit item
|
| 135 |
+
# directory. A path such as childrenroom/item/pottedplant is an object;
|
| 136 |
+
# substring matching "room" in childrenroom previously misclassified it as
|
| 137 |
+
# a complete ROOM and incorrectly bypassed proxy preparation.
|
| 138 |
+
artvip_source = record.source == "ArtVIP" or record.source.casefold().endswith("/artvip")
|
| 139 |
+
if artvip_source:
|
| 140 |
+
parts = [part.casefold() for part in path.parts]
|
| 141 |
+
if "/articulated_objects/" in path_text or "/item/" in path_text or "/itm/" in path_text:
|
| 142 |
+
return AssetKind.OBJECT
|
| 143 |
+
for marker in ("interactive_scene", "scenes"):
|
| 144 |
+
if marker in parts and len(parts) - parts.index(marker) >= 4:
|
| 145 |
+
return AssetKind.OBJECT
|
| 146 |
+
if (record.source == "Lightwheel SimReady" or h20_namespace == "lightwheel") and (
|
| 147 |
+
"/props/" in path_text or category in OBJECT_CATEGORIES
|
| 148 |
+
):
|
| 149 |
+
return AssetKind.OBJECT
|
| 150 |
+
if h20_namespace in {
|
| 151 |
+
"artvip",
|
| 152 |
+
"assets_isaac",
|
| 153 |
+
"molmospaces_thor",
|
| 154 |
+
"roboparty_20260803",
|
| 155 |
+
} and category in OBJECT_CATEGORIES:
|
| 156 |
+
return AssetKind.OBJECT
|
| 157 |
+
if record.source in OBJECT_SOURCES and category in OBJECT_CATEGORIES:
|
| 158 |
+
return AssetKind.OBJECT
|
| 159 |
+
if record.source.casefold() in {"poly haven", "ambientcg"} and (
|
| 160 |
+
"material" in category or path.suffix.casefold() in {".jpg", ".jpeg", ".png", ".exr"}
|
| 161 |
+
):
|
| 162 |
+
return AssetKind.MATERIAL
|
| 163 |
+
if "hdri" in category or path.suffix.casefold() in {".hdr", ".exr"}:
|
| 164 |
+
return AssetKind.LIGHTING
|
| 165 |
+
category_terms = set(category.split())
|
| 166 |
+
if "interior scene" in category or category_terms & {"room", "stage"}:
|
| 167 |
+
return AssetKind.ROOM
|
| 168 |
+
return record.asset_kind
|
| 169 |
+
|
| 170 |
+
|
| 171 |
+
def _path_exists(record: AssetRecord) -> bool:
|
| 172 |
+
return bool(record.usd_path) and Path(record.usd_path).exists()
|
| 173 |
+
|
| 174 |
+
|
| 175 |
+
def content_hash(record: AssetRecord) -> str:
|
| 176 |
+
existing = next((item.md5 for item in record.files if item.md5), None)
|
| 177 |
+
if existing:
|
| 178 |
+
return f"md5:{existing.casefold()}"
|
| 179 |
+
path = Path(record.usd_path)
|
| 180 |
+
if path.is_file():
|
| 181 |
+
digest = hashlib.sha256()
|
| 182 |
+
with path.open("rb") as handle:
|
| 183 |
+
for chunk in iter(lambda: handle.read(4 * 1024 * 1024), b""):
|
| 184 |
+
digest.update(chunk)
|
| 185 |
+
return f"sha256:{digest.hexdigest()}"
|
| 186 |
+
return "metadata:" + hashlib.sha256(
|
| 187 |
+
f"{record.source}\0{record.asset_id}\0{record.usd_path}".encode()
|
| 188 |
+
).hexdigest()
|
| 189 |
+
|
| 190 |
+
|
| 191 |
+
def classify(record: AssetRecord, *, check_paths: bool = True) -> AssetRecord:
|
| 192 |
+
kind = infer_asset_kind(record)
|
| 193 |
+
reasons: list[str] = []
|
| 194 |
+
display = record.display_name.strip().casefold()
|
| 195 |
+
path_text = record.usd_path.casefold()
|
| 196 |
+
category = canonical_category(record)
|
| 197 |
+
|
| 198 |
+
if record.quality_tier == "REJECTED" or record.qa_status == "REJECTED":
|
| 199 |
+
return record.model_copy(
|
| 200 |
+
update={
|
| 201 |
+
"schema_version": "1.1",
|
| 202 |
+
"asset_kind": kind,
|
| 203 |
+
"normalized_category": category,
|
| 204 |
+
"admission_status": AdmissionStatus.REJECTED,
|
| 205 |
+
"exclusion_reasons": ["upstream_rejected"],
|
| 206 |
+
"content_hash": content_hash(record),
|
| 207 |
+
}
|
| 208 |
+
)
|
| 209 |
+
if record.quality_tier == "C":
|
| 210 |
+
reasons.append("quality_tier_c")
|
| 211 |
+
if check_paths and not _path_exists(record):
|
| 212 |
+
reasons.append("missing_runtime_path")
|
| 213 |
+
if display in GENERIC_NAMES:
|
| 214 |
+
reasons.append("generic_node_name")
|
| 215 |
+
if record.source == "MolmoSpaces" and any(
|
| 216 |
+
marker in path_text for marker in ("virtual", "placeholder", "package")
|
| 217 |
+
):
|
| 218 |
+
reasons.append("molmospaces_virtual_package")
|
| 219 |
+
if record.source == "InteriorAgent" and kind == AssetKind.OBJECT:
|
| 220 |
+
reasons.append("interioragent_internal_mesh")
|
| 221 |
+
if record.source == "ArtVIP" and "/resource/" in path_text:
|
| 222 |
+
reasons.append("artvip_internal_resource")
|
| 223 |
+
if record.source == "HSSD" and (kind == AssetKind.ROOM or "/stages/" in path_text):
|
| 224 |
+
reasons.append("hssd_stage_not_object")
|
| 225 |
+
|
| 226 |
+
if kind == AssetKind.OBJECT:
|
| 227 |
+
runtime = record.runtime_compatibility
|
| 228 |
+
if (
|
| 229 |
+
runtime is None
|
| 230 |
+
or not runtime.canonical_usd_path
|
| 231 |
+
or not runtime.proxy_gltf_path
|
| 232 |
+
or not runtime.proxy_sdf_path
|
| 233 |
+
or not Path(runtime.canonical_usd_path).is_file()
|
| 234 |
+
or not Path(runtime.proxy_gltf_path).is_file()
|
| 235 |
+
or not Path(runtime.proxy_sdf_path).is_file()
|
| 236 |
+
):
|
| 237 |
+
reasons.append("proxy_not_prepared")
|
| 238 |
+
if kind == AssetKind.OBJECT and record.source not in OBJECT_SOURCES | {"Poly Haven"}:
|
| 239 |
+
if record.source == "MolmoSpaces":
|
| 240 |
+
reasons.append("source_not_runtime_instantiable")
|
| 241 |
+
|
| 242 |
+
status = AdmissionStatus.COLD if reasons else AdmissionStatus.ACTIVE
|
| 243 |
+
return record.model_copy(
|
| 244 |
+
update={
|
| 245 |
+
"schema_version": "1.1",
|
| 246 |
+
"asset_kind": kind,
|
| 247 |
+
"normalized_category": category,
|
| 248 |
+
"admission_status": status,
|
| 249 |
+
"exclusion_reasons": sorted(set(reasons)),
|
| 250 |
+
"content_hash": content_hash(record),
|
| 251 |
+
# Canonical aliases are recomputed by the following deduplication
|
| 252 |
+
# pass; a formerly cold alias can become the prepared canonical.
|
| 253 |
+
"canonical_asset_id": None,
|
| 254 |
+
}
|
| 255 |
+
)
|
| 256 |
+
|
| 257 |
+
|
| 258 |
+
def _canonical_score(record: AssetRecord) -> tuple[int, int, int, int, int, str]:
|
| 259 |
+
qa = {"ISAAC_VALIDATED": 3, "CONVERTED": 2, "DOWNLOADED": 1, "REJECTED": 0}
|
| 260 |
+
quality = {"A": 3, "B": 2, "C": 1, "REJECTED": 0}
|
| 261 |
+
provenance = sum(bool(item.source_url and item.md5) for item in record.files)
|
| 262 |
+
runtime = record.runtime_compatibility
|
| 263 |
+
compatibility = int(bool(runtime and runtime.canonical_usd_path))
|
| 264 |
+
# Deduplication must never nominate a cold, uninstantiable record when the
|
| 265 |
+
# same content already has a fully prepared ACTIVE representation. The
|
| 266 |
+
# previous ordering let provenance/quality beat runtime readiness, leaving
|
| 267 |
+
# every alias of some H20 assets cold despite a valid proxy being present.
|
| 268 |
+
active = int(record.admission_status == AdmissionStatus.ACTIVE)
|
| 269 |
+
return (
|
| 270 |
+
active,
|
| 271 |
+
qa[record.qa_status],
|
| 272 |
+
quality[record.quality_tier],
|
| 273 |
+
provenance,
|
| 274 |
+
compatibility,
|
| 275 |
+
record.asset_id,
|
| 276 |
+
)
|
| 277 |
+
|
| 278 |
+
|
| 279 |
+
def classify_and_deduplicate(
|
| 280 |
+
records: list[AssetRecord], *, check_paths: bool = True
|
| 281 |
+
) -> list[AssetRecord]:
|
| 282 |
+
classified = [classify(record, check_paths=check_paths) for record in records]
|
| 283 |
+
groups: dict[str, list[int]] = defaultdict(list)
|
| 284 |
+
for index, record in enumerate(classified):
|
| 285 |
+
assert record.content_hash is not None
|
| 286 |
+
groups[record.content_hash].append(index)
|
| 287 |
+
for indices in groups.values():
|
| 288 |
+
if len(indices) < 2:
|
| 289 |
+
continue
|
| 290 |
+
canonical_index = max(indices, key=lambda index: _canonical_score(classified[index]))
|
| 291 |
+
canonical_id = classified[canonical_index].asset_id
|
| 292 |
+
for index in indices:
|
| 293 |
+
if index == canonical_index:
|
| 294 |
+
continue
|
| 295 |
+
record = classified[index]
|
| 296 |
+
reasons = sorted(set([*record.exclusion_reasons, "duplicate_content"]))
|
| 297 |
+
classified[index] = record.model_copy(
|
| 298 |
+
update={
|
| 299 |
+
"admission_status": AdmissionStatus.COLD,
|
| 300 |
+
"exclusion_reasons": reasons,
|
| 301 |
+
"canonical_asset_id": canonical_id,
|
| 302 |
+
}
|
| 303 |
+
)
|
| 304 |
+
return classified
|