File size: 6,729 Bytes
b195905 b2869c3 b195905 b2869c3 b195905 b2869c3 b195905 b2869c3 b195905 b2869c3 d82e4a7 a4eb37b 2edb060 b195905 a4eb37b b195905 99d8841 b195905 b2869c3 b195905 748f45a 99d8841 748f45a 99d8841 b195905 b2869c3 b195905 748f45a b195905 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | # AGENTS.md
This repository is a reusable robotics and simulation asset library hosted as a Hugging Face Dataset.
## Scope
The asset library stores normalized, reusable assets from multiple sources:
- RoboCasa
- Discoverse
- TinyForge
- Hunter
- third-party asset sites
RoboCasa is one source inside this library, not the root format for the whole library.
## Directory layout
Use this canonical layout:
```text
assets/<source>/raw/<asset_type>/<category>/<asset_id>/
```
Example:
```text
assets/robocasa/raw/fixtures/dishwashers/Dishwasher031/
```
Each asset directory must contain the source asset files and a `metadata.yaml`.
For large upstream asset trees with many internal relative references, still use the canonical four-level layout under `raw/` and index the tree as one collection-level asset. Current example:
```text
assets/discoverse/raw/collections/models/discoverse_models/
```
This avoids breaking MJCF includes and mesh paths.
Derived outputs must live under:
```text
assets/<source>/derived/<asset_type>/<category>/<asset_id>/
```
Use `derived/` for convex decomposition, collision meshes, cleaned meshes, conversions, and other generated outputs. Do not overwrite raw assets.
For convex decomposition, use:
```text
assets/<source>/derived/convex_decompositions/<category>/<asset_id>_<variant>/
```
Preferred generator:
```bash
python scripts/run_convex_decomposition.py assets/<source>/raw/<asset_type>/<category>/<asset_id> --mesh <relative_mesh_path> --variant coacd_v1
```
Generated MuJoCo include files have different insertion contexts:
```text
mjcf/convex_assets_include.xml # include at MJCF root/top level
mjcf/convex_geoms_include.xml # include inside the target body
mjcf/convex_collision_include.xml # standalone wrapper for preview/convenience
```
Do not edit the raw source `model.xml` when adding convex collision geometry. Integrate the derived includes in downstream task scenes or in separate derived MJCF files.
For thin rod, rack, grid, shelf, and slot-like structures where convex hulls may bridge functional gaps, prefer primitive collision proxies:
```text
assets/<source>/derived/primitive_collision_proxies/<category>/<asset_id>_<variant>/
```
Preferred generator:
```bash
python scripts/run_primitive_collision_proxy.py assets/<source>/raw/<asset_type>/<category>/<asset_id> --mesh <relative_obj_path> --variant primitive_boxes_v1
```
Primitive proxy source of truth:
```text
proxy/primitive_collision_proxy.json
```
Generated downstream fragments:
```text
mjcf/primitive_geoms_include.xml # include inside the target body
mjcf/primitive_collision_include.xml # standalone wrapper for preview/convenience
curobo/primitive_world.yml # cuRobo cuboid fragment from forbidden cuboids
```
Use primitive proxies only after inspecting that boxes do not bridge task-critical gaps. For temporary trials, do not use `--register-manifest`.
Detailed rules are in:
```text
docs/primitive_collision_proxy_spec.md
```
Whenever a source is reorganized during import, record the original upstream layout and the current layout in:
```text
docs/structure_mapping.md
docs/source_notes/<source>.md
```
Do not change source paths without recording the correspondence.
## Naming rules
- `source`: lowercase snake_case, for example `robocasa`, `discoverse`, `tinyforge`, `hunter`, `third_party`.
- `asset_type`: lowercase snake_case plural when it represents a collection, for example `fixtures`, `objects`, `scenes`, `textures`, `robots`, `environments`, `convex_decompositions`, `primitive_collision_proxies`.
- `category`: lowercase snake_case, usually preserving common upstream category wording, for example `dishwashers`, `cabinets`, `cups`.
- `asset_id`: preserve upstream IDs when they are stable and meaningful, for example `Dishwasher031`.
- Global `asset_id`: `<source>.<asset_type>.<category>.<upstream_id>`.
## Required metadata
Every asset directory must include `metadata.yaml` with at least:
- `asset_id`
- `source`
- `source_asset_id`
- `asset_type`
- `category`
- `format`
- `entry_file`
- `license`
- `origin_url`
- `path`
- `tags`
Recommended additional fields for production-oriented assets:
- `readiness_level`
- `source_commit`
- `retrieval_date`
- `conversion_tool`
- `conversion_notes`
- `raw_sha256`
- `validation_status`
Readiness levels are defined in:
```text
docs/asset_readiness_classification.md
```
## Third-party asset rule
If any external third-party asset is used by a project, experiment, dataset, or generated scene, copy that exact used asset into this repository under:
```text
assets/third_party/raw/<asset_type>/<category>/<asset_id>/
```
Do not rely only on remote third-party URLs for reproducibility. Record the original URL, license, retrieval date, and any conversion steps in `metadata.yaml`.
Before use, candidate external sources may be recorded as links only in:
```text
docs/external_source_catalog.md
docs/placement_asset_notes.md
docs/source_notes/third_party.md
```
Do not add link-only candidates to `manifest/assets.jsonl`; the manifest is only for assets physically stored in this repository.
When evaluating or importing external assets, keep these counts separate:
```text
candidate_count
license_pass_count
downloaded_count
load_pass_count
physics_pass_count
policy_pass_count
L0_count
```
Do not equate source dataset size or downloaded file count with production-ready assets.
## Manifest rule
Every asset must also be listed in:
```text
manifest/assets.jsonl
```
The manifest is the global index. Keep one JSON object per line.
## Validation
Before upload, run:
```bash
python scripts/validate_asset.py assets/<source>/raw/<asset_type>/<category>/<asset_id>
python scripts/validate_asset.py assets/<source>/derived/<asset_type>/<category>/<asset_id>
python scripts/validate_asset.py --all
```
For MJCF assets, validation should verify:
- `metadata.yaml` exists
- the declared entry file exists
- mesh and texture references in `model.xml` resolve relative to the asset directory
- the asset has a matching row in `manifest/assets.jsonl`
## Hugging Face workflow
This repository is intended to be uploaded to a Hugging Face Dataset repo.
Recommended commands:
```bash
export HF_ENDPOINT=https://hf-mirror.com
hf auth login
hf repo create <namespace>/<dataset_repo> --type dataset --private
hf upload <namespace>/<dataset_repo> . . --repo-type dataset
hf download <namespace>/<dataset_repo> --repo-type dataset --local-dir ./asset-library --max-workers 4
```
Prefer the wrapper scripts in this repository:
```bash
scripts/upload_to_hf.sh <namespace>/<dataset_repo>
scripts/download_from_hf.sh <namespace>/<dataset_repo> ./asset-library
```
|