yuchi233 commited on
Commit
79e17fd
·
verified ·
1 Parent(s): bbc768e

Upload README_zh.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README_zh.md +314 -0
README_zh.md ADDED
@@ -0,0 +1,314 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Placement Assets 资产库
2
+
3
+ 这是一个面向机器人仿真与 placement 任务的统一资产库,当前托管在 Hugging Face Dataset:
4
+
5
+ ```text
6
+ https://huggingface.co/datasets/yuchi233/Placement_Assets
7
+ ```
8
+
9
+ 本仓库不是 RoboCasa 的镜像,也不是基于 RoboCasa 单独建立的资产库。RoboCasa、DISCOVERSE、TinyForge、Hunter 和第三方资产站都被视为不同的资产来源,统一纳入同一套存储、命名、索引和溯源规范。
10
+
11
+ ## 当前已入库资产
12
+
13
+ - RoboCasa 洗碗机 fixture:
14
+ - 路径:`assets/robocasa/fixtures/dishwashers/`
15
+ - 数量:25 个 MJCF 资产
16
+ - 每个资产保留 `model.xml`、`visuals/` 和本地 `metadata.yaml`
17
+ - RoboCasa 洗碗机相关辅助文件:
18
+ - registry:`assets/robocasa/fixtures/fixture_registry/dishwasher.yaml`
19
+ - fixture 实现参考:`docs/source_notes/robocasa/dishwasher_fixture.py`
20
+ - DISCOVERSE models 集合:
21
+ - 路径:`assets/discoverse/collections/models/discoverse_models/`
22
+ - 内容:MJCF、URDF、mesh、PNG/reference image 等
23
+ - 处理方式:作为 collection-level asset 入库,内部保持 DISCOVERSE upstream 的 `models/` 目录结构,避免破坏 MJCF include 和 mesh 相对路径
24
+
25
+ ## 统一目录结构
26
+
27
+ 所有可索引资产都必须使用四层结构:
28
+
29
+ ```text
30
+ assets/<source>/<asset_type>/<category>/<asset_id>/
31
+ ```
32
+
33
+ 示例:
34
+
35
+ ```text
36
+ assets/robocasa/fixtures/dishwashers/Dishwasher031/
37
+ ```
38
+
39
+ 大规模 upstream 资产树如果包含大量内部相对引用,也必须使用四层结构,但可作为集合资产保存:
40
+
41
+ ```text
42
+ assets/<source>/collections/<category>/<asset_id>/
43
+ ```
44
+
45
+ 示例:
46
+
47
+ ```text
48
+ assets/discoverse/collections/models/discoverse_models/
49
+ ├── metadata.yaml
50
+ ├── mjcf/
51
+ ├── meshes/
52
+ └── urdf/
53
+ ```
54
+
55
+ ## 命名规则
56
+
57
+ 目录字段:
58
+
59
+ ```text
60
+ assets/<source>/<asset_type>/<category>/<asset_id>/
61
+ ```
62
+
63
+ - `source`:资产来源,使用小写 snake_case,例如 `robocasa`、`discoverse`、`tinyforge`、`hunter`、`third_party`
64
+ - `asset_type`:资产类型,例如 `fixtures`、`objects`、`scenes`、`robots`、`collections`
65
+ - `category`:类别,例如 `dishwashers`、`models`、`cups`、`cabinets`
66
+ - `asset_id`:优先保留 upstream 稳定 ID,例如 `Dishwasher031`
67
+
68
+ 全局 asset_id:
69
+
70
+ ```text
71
+ <source>.<asset_type>.<category>.<upstream_id>
72
+ ```
73
+
74
+ 示例:
75
+
76
+ ```text
77
+ robocasa.fixtures.dishwashers.Dishwasher031
78
+ discoverse.collections.models.discoverse_models
79
+ ```
80
+
81
+ ## 仓库结构
82
+
83
+ ```text
84
+ .
85
+ ├── AGENTS.md # 给 agent / 后续维护者的仓库使用说明
86
+ ├── README.md # 英文 README
87
+ ├── README_zh.md # 中文 README
88
+ ├── assets/ # 实际资产文件
89
+ │ ├── discoverse/
90
+ │ ├── hunter/
91
+ │ ├── robocasa/
92
+ │ ├── third_party/
93
+ │ └── tinyforge/
94
+ ├── docs/ # 规范、来源说明、调研记录
95
+ │ ├── asset_readiness_classification.md
96
+ │ ├── external_source_catalog.md
97
+ │ ├── naming_spec.md
98
+ │ ├── placement_asset_notes.md
99
+ │ ├── structure_mapping.md
100
+ │ ├── source_notes/
101
+ │ └── storage_spec.md
102
+ ├── manifest/
103
+ │ ├── assets.jsonl # 全局资产索引,一行一个资产
104
+ │ ├── licenses.yaml # license 字典
105
+ │ └── sources.yaml # 来源与候选第三方来源
106
+ └── scripts/
107
+ ├── download_from_hf.sh
108
+ ├── upload_to_hf.sh
109
+ └── validate_asset.py
110
+ ```
111
+
112
+ ## 索引与 metadata
113
+
114
+ 全局索引文件:
115
+
116
+ ```text
117
+ manifest/assets.jsonl
118
+ ```
119
+
120
+ 每个资产目录也必须包含:
121
+
122
+ ```text
123
+ metadata.yaml
124
+ ```
125
+
126
+ 必需字段包括:
127
+
128
+ - `asset_id`
129
+ - `source`
130
+ - `source_asset_id`
131
+ - `asset_type`
132
+ - `category`
133
+ - `format`
134
+ - `entry_file`
135
+ - `license`
136
+ - `origin_url`
137
+ - `path`
138
+ - `tags`
139
+
140
+ 推荐字段包括:
141
+
142
+ - `readiness_level`
143
+ - `source_commit`
144
+ - `retrieval_date`
145
+ - `conversion_tool`
146
+ - `conversion_notes`
147
+ - `raw_sha256`
148
+ - `validation_status`
149
+
150
+ ## 原始结构与当前结构映射
151
+
152
+ 如果导入时修改了 upstream 的目录结构,必须记录原始结构和当前结构的对应关系。
153
+
154
+ 统一记录位置:
155
+
156
+ ```text
157
+ docs/structure_mapping.md
158
+ docs/source_notes/<source>.md
159
+ ```
160
+
161
+ 当前例子:
162
+
163
+ ```text
164
+ DISCOVERSE upstream:
165
+ /home/yuchi/projects/DISCOVERSE/models/
166
+
167
+ 当前仓库:
168
+ assets/discoverse/collections/models/discoverse_models/
169
+ ```
170
+
171
+ RoboCasa 洗碗机则是一对一映射:
172
+
173
+ ```text
174
+ robocasa/models/assets/fixtures/dishwashers/Dishwasher031/
175
+ → assets/robocasa/fixtures/dishwashers/Dishwasher031/
176
+ ```
177
+
178
+ ## 资产就绪度 L0–L5
179
+
180
+ 资产存进仓库不代表可以直接用于产数。就绪度单独记录:
181
+
182
+ - L0:已通过目标任务、机器人 embodiment、policy、verifier 和 episode replay 验收,可稳定产数
183
+ - L1:在原仿真器中是完整���运行资产,但尚未适配目标产数链路
184
+ - L2:已有 articulated 结构,但物理、碰撞、任务语义等信息不完整
185
+ - L3:可动部件已分离,但缺少可靠 joint
186
+ - L4:完整静态整件
187
+ - L5:原始、缺件、未装配或需要显著修复的静态 mesh
188
+
189
+ 完整标准见:
190
+
191
+ ```text
192
+ docs/asset_readiness_classification.md
193
+ ```
194
+
195
+ 当前状态:
196
+
197
+ - RoboCasa dishwasher:`L1_candidate`
198
+ - DISCOVERSE collection:`L1_L2_candidate_by_subasset`
199
+
200
+ ## 第三方资产规则
201
+
202
+ 第三方来源可以先只记录链接,不下载、不入 manifest。
203
+
204
+ 只有当某个项目、实验、任务或生成场景实际使用了第三方资产时,才把具体使用到的资产复制进本仓库:
205
+
206
+ ```text
207
+ assets/third_party/<asset_type>/<category>/<asset_id>/
208
+ ```
209
+
210
+ 导入时必须记录:
211
+
212
+ - 原始 URL
213
+ - provider / site name
214
+ - license
215
+ - retrieval date
216
+ - source asset ID
217
+ - 本地路径
218
+ - 转换或清洗步骤
219
+ - 必要时记录 hash
220
+
221
+ 候选第三方来源见:
222
+
223
+ ```text
224
+ docs/external_source_catalog.md
225
+ docs/source_notes/third_party.md
226
+ ```
227
+
228
+ 重要规则:
229
+
230
+ - link-only candidate 不写入 `manifest/assets.jsonl`
231
+ - 下载数量不等于可生产资产数量
232
+ - 来源库总量不能直接相加,必须处理上游派生和重复资产
233
+
234
+ ## 校验
235
+
236
+ 在仓库根目录运行:
237
+
238
+ ```bash
239
+ python scripts/validate_asset.py --all
240
+ ```
241
+
242
+ 当前期望输出:
243
+
244
+ ```text
245
+ validated_assets=26
246
+ ```
247
+
248
+ 也可以校验单个资产:
249
+
250
+ ```bash
251
+ python scripts/validate_asset.py assets/robocasa/fixtures/dishwashers/Dishwasher031
252
+ ```
253
+
254
+ 校验内容包括:
255
+
256
+ - `metadata.yaml` 是否存在
257
+ - `entry_file` 是否存在
258
+ - 资产目录是否符合四层结构
259
+ - metadata 与目录字段是否一致
260
+ - metadata 与 manifest 是否一致
261
+ - MJCF 中的 mesh/texture 文件引用是否能解析
262
+
263
+ ## 下载
264
+
265
+ ```bash
266
+ export HF_ENDPOINT=https://hf-mirror.com
267
+
268
+ hf download yuchi233/Placement_Assets \
269
+ --repo-type dataset \
270
+ --local-dir ./Placement_Assets \
271
+ --max-workers 4
272
+ ```
273
+
274
+ 或使用脚本:
275
+
276
+ ```bash
277
+ scripts/download_from_hf.sh yuchi233/Placement_Assets ./Placement_Assets
278
+ ```
279
+
280
+ ## 上传
281
+
282
+ 先登录:
283
+
284
+ ```bash
285
+ export HF_ENDPOINT=https://hf-mirror.com
286
+ hf auth login
287
+ ```
288
+
289
+ 上传:
290
+
291
+ ```bash
292
+ cd /home/yuchi/asset-library
293
+ scripts/upload_to_hf.sh yuchi233/Placement_Assets
294
+ ```
295
+
296
+ 或者直接使用:
297
+
298
+ ```bash
299
+ hf upload yuchi233/Placement_Assets . . --repo-type dataset
300
+ ```
301
+
302
+ ## 后续扩展流程
303
+
304
+ 新增资产时按以下步骤:
305
+
306
+ 1. 确认来源、license、可再分发性和用途。
307
+ 2. 确定资产粒度:单资产还是 collection-level asset。
308
+ 3. 放入统一四层目录结构。
309
+ 4. 保留 upstream 文件名和相对路径,除非有兼容性原因。
310
+ 5. 添加 `metadata.yaml`。
311
+ 6. 更新 `manifest/assets.jsonl`。
312
+ 7. 如果改了目录结构,更新 `docs/structure_mapping.md` 和 `docs/source_notes/<source>.md`。
313
+ 8. 运行 `python scripts/validate_asset.py --all`。
314
+ 9. 上传到 Hugging Face。