ChangChrisLiu commited on
Commit
7d282fe
·
verified ·
1 Parent(s): c573a1d

Add real-time RoboCasa environment graph extraction pipeline

Browse files
Files changed (1) hide show
  1. docs/SCHEMA.md +42 -634
docs/SCHEMA.md CHANGED
@@ -1,659 +1,67 @@
1
- # GWAM_Data Graph Schema v1
2
 
3
- This schema defines the first graph-augmented RoboCasa export for Graph-WAM / DreamZero-style joint vision+action world modeling.
4
-
5
- V1 intentionally excludes depth. Depth is a v2 extension.
6
-
7
- ## Core principle
8
-
9
- Each timestep has one global scene graph:
10
-
11
- ```text
12
- G_t = (V_t, E_state_t, E_prior, globals_t)
13
- ```
14
-
15
- Camera views are evidence attached to global nodes, not separate graphs.
16
-
17
- ```text
18
- robot0_agentview_right -> node view evidence
19
- robot0_agentview_left -> node view evidence
20
- robot0_eye_in_hand -> node view evidence
21
- ```
22
-
23
- ## Cameras
24
-
25
- Canonical names:
26
-
27
- ```yaml
28
- side_right: robot0_agentview_right
29
- side_left: robot0_agentview_left
30
- wrist: robot0_eye_in_hand
31
- primary_side: side_right
32
- ```
33
-
34
- All three cameras are exported in v1. `side_right` is canonical only for single-side experiments and report ordering.
35
-
36
- ## Node definition
37
-
38
- A node is a task-relevant component, object, fixture, surface, articulated part, or optional robot aggregate.
39
-
40
- Recommended families:
41
-
42
- ```text
43
- object
44
- distractor
45
- surface
46
- receptacle
47
- fixture
48
- articulated_part
49
- handle
50
- appliance_part
51
- robot_optional
52
- ```
53
-
54
- Do not create one node per MuJoCo geom. Group geoms/bodies into task-relevant components using a deterministic `node_grouping_<task>.yaml` file.
55
-
56
- ## Node record
57
-
58
- Each node in `graph_static.json` contains:
59
-
60
- ```json
61
- {
62
- "node_id": "obj_000",
63
- "family": "object",
64
- "category_text": "mug",
65
- "instance_name": "mug_1",
66
- "body_names": ["mug_1_main"],
67
- "body_ids": [123],
68
- "geom_ids": [456, 457],
69
- "joint_ids": [],
70
- "movability": {
71
- "free_movable": true,
72
- "articulated": false,
73
- "static": false
74
- },
75
- "type_encoding": {
76
- "encoder": "openai/clip-vit-base-patch32-text",
77
- "raw_dim": 512,
78
- "stored_dim": 32,
79
- "projection": "pca_or_random_projection_frozen_v1",
80
- "vector_ref": "node_type_clip32.npy:0"
81
- },
82
- "source": "sim_metadata",
83
- "confidence": 1.0
84
- }
85
- ```
86
-
87
- ## Per-frame node state
88
-
89
- Each node in each `frames.jsonl` timestep contains:
90
-
91
- ```json
92
- {
93
- "node_id": "obj_000",
94
- "position_world": [0.0, 0.0, 0.0],
95
- "orientation_world_xyzw": [0.0, 0.0, 0.0, 1.0],
96
- "linear_velocity": [0.0, 0.0, 0.0],
97
- "angular_velocity": [0.0, 0.0, 0.0],
98
- "qpos": null,
99
- "qvel": null,
100
- "visibility": {
101
- "side_right": {
102
- "visible": true,
103
- "mask_ref": "seg/side_right/frame_000123.npz:obj_000",
104
- "bbox_xyxy": [12, 34, 90, 110],
105
- "area_px": 1500,
106
- "centroid_xy": [50.2, 70.1]
107
- },
108
- "side_left": {"visible": false},
109
- "wrist": {"visible": true}
110
- }
111
- }
112
- ```
113
-
114
- No depth fields are included in v1.
115
-
116
- ## Node feature tensor
117
-
118
- `graph_tensors.npz` stores:
119
-
120
- ```text
121
- node_feats: float32[T, N_max, D_node]
122
- node_mask: bool[N_max]
123
- ```
124
-
125
- Recommended v1 node feature block:
126
 
127
  ```text
128
- pose_position_world 3
129
- pose_orientation_6d 6
130
- linear_velocity 3
131
- angular_velocity 3
132
- qpos_scalar_or_zero 1
133
- qvel_scalar_or_zero 1
134
- movability_free_movable 1
135
- movability_articulated 1
136
- family_onehot 8-10
137
- clip_type_text_projected 32
138
- visibility_side_right 1
139
- visibility_side_left 1
140
- visibility_wrist 1
141
- mask_area_side_right_norm 1
142
- mask_area_side_left_norm 1
143
- mask_area_wrist_norm 1
144
- bbox_center_side_right_xy_norm 2
145
- bbox_center_side_left_xy_norm 2
146
- bbox_center_wrist_xy_norm 2
147
- bbox_size_side_right_wh_norm 2
148
- bbox_size_side_left_wh_norm 2
149
- bbox_size_wrist_wh_norm 2
150
  ```
151
 
152
- Default Fable-reviewed tensor view for full v1 uses D_node = 317:
153
 
154
  ```text
155
- [0:256] visual_256 from masked visual encoder / SAM2-on-oracle-mask using canonical side mask
156
- [256:259] position_world xyz
157
- [259:263] orientation quaternion xyzw
158
- [263:266] linear velocity
159
- [266:269] angular velocity
160
- [269:270] qpos normalized or zero
161
- [270:271] qvel normalized or zero
162
- [271:272] binary appliance/control state or zero
163
- [272:274] movability [free_movable, articulated]
164
- [274:275] robot contact flag
165
- [275:277] visibility [side_right, wrist]
166
- [277:285] family one-hot, 8 slots
167
- [285:317] type_clip_32
168
- ```
169
-
170
- A compact loader may construct a smaller feature vector, but the published default tensor view is 317D and the slicing map must be saved in `metadata/tensor_view_v1.json`.
171
-
172
- ### CLIP component type encoding
173
-
174
- Store three things:
175
-
176
- 1. raw `category_text`, e.g. `"drawer handle"`, `"cabinet"`, `"mug"`;
177
- 2. CLIP metadata:
178
-
179
- ```json
180
- {
181
- "encoder": "openai/clip-vit-base-patch32-text",
182
- "raw_dim": 512,
183
- "normalization": "l2",
184
- "prompt_template": "a photo of a {category_text}",
185
- "stored_dim": 32,
186
- "projection": "frozen_pca_or_random_projection_v1"
187
- }
188
  ```
189
 
190
- 3. compressed vector in tensors and optionally raw vector sidecar:
191
 
192
  ```text
193
- node_type_clip32.npy
194
- node_type_clip512_optional.npy
 
 
 
 
 
 
 
 
195
  ```
196
 
197
- Recommendation: use frozen CLIP text embeddings, not trainable text encodings. The 32D projected vector is the default model-facing feature. The full 512D CLIP vector is stored once per type in `encodings/type_encodings_v1.npz` or equivalent; raw category text and encoder metadata are authoritative.
198
-
199
- ## Edge tiers
200
-
201
- ### State-tier edges
202
 
203
- State-tier edges represent current physical/geometric state at timestep `t`.
204
 
205
- Allowed families:
206
 
207
- ```text
208
- support_contact
209
- robot_contact
210
- held_by_gripper
211
- candidate_spatial
212
- inside_current
213
- articulation_state
214
- ```
215
 
216
- Sources:
217
 
218
  ```text
219
- sim_contacts
220
- sim_qpos
221
- sim_pose_geometry
222
- robot_state
223
  ```
224
 
225
- Never source state-tier edges from a reasoning model.
226
-
227
- ### Prior-tier edges
228
-
229
- Prior-tier edges represent static semantic, vocabulary, or structural relations.
230
-
231
- Allowed families:
232
-
233
- ```text
234
- articulation_part
235
- kinematic_part_of
236
- precondition_affordance
237
- category_compatibility
238
- ```
239
-
240
- Sources:
241
-
242
- ```text
243
- sim_kinematic_tree
244
- sim_metadata
245
- human_reviewed_rule_table
246
- ```
247
-
248
- Reserved future source values:
249
-
250
- ```text
251
- llm_prior
252
- vlm_caption
253
- manual_annotation
254
- ```
255
-
256
- In sim v1, do not require reasoning models. If an LLM drafts the rule table, mark the committed source as `human_reviewed_rule_table` after review.
257
-
258
- ## Edge record
259
-
260
- ```json
261
- {
262
- "src": "obj_000",
263
- "dst": "fixture_001",
264
- "tier": "state",
265
- "family": "support_contact",
266
- "relation_type": "resting_on",
267
- "active": true,
268
- "directed": true,
269
- "source": "sim_contacts",
270
- "confidence": 1.0,
271
- "attrs": {
272
- "num_contacts": 4,
273
- "min_contact_dist": -0.002,
274
- "relative_position": [0.1, 0.0, 0.2]
275
- }
276
- }
277
- ```
278
-
279
- ## Edge tensors
280
-
281
- ```text
282
- rel_state: float32[T, N_max, N_max, C_state]
283
- rel_prior: float32[N_max, N_max, C_prior]
284
- ```
285
-
286
- Suggested `C_state` channels:
287
-
288
- ```text
289
- active_contact
290
- supporting
291
- supported_by
292
- robot_touching
293
- held_by_gripper
294
- inside_current
295
- near
296
- above
297
- articulation_open_scalar
298
- relative_position_xyz 3
299
- relative_distance 1
300
- ```
301
-
302
- Suggested `C_prior` channels:
303
-
304
- ```text
305
- part_of
306
- controls_articulation
307
- can_support
308
- can_contain
309
- can_be_placed_in
310
- same_fixture_group
311
- category_compatible
312
- ```
313
-
314
- Goal/instruction-derived edges must not enter `rel_state` or `rel_prior`. Goal grounding lives in globals only.
315
-
316
- ## Globals
317
-
318
- Each episode has:
319
-
320
- ```json
321
- {
322
- "dataset_version": "robocasa_target_atomic_seen_graph_v1",
323
- "task": "OpenDrawer",
324
- "split": "target_atomic_seen",
325
- "source": "human",
326
- "language_instruction": "Open the drawer.",
327
- "control_freq": 20,
328
- "primary_side_camera": "robot0_agentview_right",
329
- "exported_cameras": ["robot0_agentview_right", "robot0_agentview_left", "robot0_eye_in_hand"],
330
- "graph_source": "oracle_sim",
331
- "depth_included": false,
332
- "goal_grounding": {
333
- "supervision_only": true,
334
- "target_node_ids": [],
335
- "goal_relation_set": []
336
- }
337
- }
338
- ```
339
-
340
- ## Events / ΔG
341
-
342
- `events.jsonl` records relation changes and graph events:
343
-
344
- ```json
345
- {"frame": 123, "kind": "contact_make", "src": "obj_000", "dst": "surface_000", "from": false, "to": true}
346
- ```
347
-
348
- Event kinds:
349
-
350
- ```text
351
- contact_make
352
- contact_break
353
- support_change
354
- grasp
355
- release
356
- articulation_open_threshold
357
- articulation_close_threshold
358
- inside_make
359
- inside_break
360
- visibility_appeared
361
- visibility_disappeared
362
- goal_satisfied_eval_only
363
- ```
364
-
365
- ## Leakage rules
366
-
367
- - No instruction-derived target edge in `rel_state` or `rel_prior`.
368
- - No reasoning-model output in current physical state fields.
369
- - Prior edges must be broadcast by category/structure, not only attached to the target pair.
370
- - Graph inventory must be deterministic from sim metadata and task configs, not filtered by language relevance.
371
- - Store `source` for every node/edge/global field.
372
-
373
-
374
- ## Published layout vs extraction working layout
375
-
376
- The extraction workspace may use per-frame PNG/NPZ files because they are easy to inspect. The Hugging Face published data should avoid millions of files. Preferred published layout after data exists:
377
 
378
  ```text
379
- data/v1_no_depth/
380
- meta/info.json
381
- meta/tasks.jsonl
382
- meta/episodes.jsonl
383
- videos/chunk-000/observation.images.robot0_agentview_right/episode_000000.mp4
384
- videos/chunk-000/observation.images.robot0_agentview_left/episode_000000.mp4
385
- videos/chunk-000/observation.images.robot0_eye_in_hand/episode_000000.mp4
386
- graphs/chunk-000/episode_000000.graph.jsonl.zst
387
- masks/chunk-000/episode_000000.masks.npz
388
- masks/chunk-000/episode_000000.mask_index.jsonl.zst
389
- tensors/chunk-000/episode_000000.graph_tensors.npz
390
- audit/chunk-000/episode_000000_summary.json
391
  ```
392
 
393
- This LeRobot-like chunked layout is the publication target. Per-episode directories in the extraction plan are an intermediate/debugging layout.
394
-
395
-
396
- # Schema v1.1 normative update
397
-
398
-
399
-
400
- Fable 5 and Codex both reviewed the six design questions about multi-view graphs, velocity, feature balance, source availability, task-family coverage, and vocabulary edges. The v1.1 clarification is now the normative design.
401
-
402
- ### 1. One global graph, not one graph per camera
403
-
404
- Use one authoritative global graph per timestep:
405
-
406
- ```text
407
- G_t = (V_t, E_state_t, E_prior, globals_t)
408
- ```
409
-
410
- Do not create separate physical graphs for `robot0_agentview_right`, `robot0_agentview_left`, and `robot0_eye_in_hand`.
411
-
412
- Reason:
413
-
414
- - Object identity is global. A mug visible in the right camera and wrist camera is the same MuJoCo body/node.
415
- - Physical relations are global. Contact, support, containment, qpos, held state, and robot interaction do not become false because a camera cannot see one endpoint.
416
- - Per-camera graphs would confuse occlusion with object deletion and make physical edges view-dependent.
417
- - RoboCasa/MuJoCo already gives free cross-view association through `segmentation objid -> geom -> body -> node`.
418
-
419
- But the user’s concern is correct: camera evidence is different. Therefore v1.1 stores **one global graph with per-view node evidence and per-view visual features**.
420
-
421
- Normative multi-view tensors:
422
-
423
- ```text
424
- visual_views float16[T, N_max, 3, 256] # per-view masked RGB/SAM2-style visual features
425
- view_visible bool[T, N_max, 3]
426
- view_centroid float16[T, N_max, 3, 2]
427
- view_area float16[T, N_max, 3, 1]
428
- ```
429
-
430
- View order:
431
-
432
- ```text
433
- 0 = robot0_agentview_right
434
- 1 = robot0_agentview_left
435
- 2 = robot0_eye_in_hand
436
- ```
437
-
438
- The canonical side visual feature remains in the flat compatibility node tensor, but the complete visual evidence is `visual_views`.
439
-
440
- ### 2. Velocity definition
441
-
442
- Velocity means node-level physical velocity from the simulator, source-tagged.
443
-
444
- Recommended source in RoboCasa/MuJoCo:
445
-
446
- ```text
447
- mujoco.mj_objectVelocity(model, data, mjOBJ_BODY, body_id, res, flg_local=0)
448
- ```
449
-
450
- This gives 6D world-frame body velocity. Store as linear and angular world velocity after confirming convention in the exporter.
451
-
452
- Do not use raw free-joint `qvel` as object angular velocity without care: MuJoCo free-joint angular velocity conventions can be body-local. Use `mj_objectVelocity` for body-level velocity and store raw `qvel` only for joint/articulation state.
453
-
454
- Per family:
455
-
456
- | Family | Body velocity | Joint velocity |
457
- |---|---|---|
458
- | `object` / movable item | root body world velocity | zero unless jointed |
459
- | `articulated_part` | part body world velocity | scalar qvel is primary articulation signal |
460
- | `control` | body velocity if meaningful | scalar qvel / control state if jointed |
461
- | `surface` / `receptacle` / `fixture` | zero, with `velocity_source=static_fixture` | zero unless fixture state joint exists |
462
- | optional robot node | TCP/eef velocity from robot state or MuJoCo body velocity | robot proprio stream remains primary |
463
-
464
- Add QA:
465
-
466
- ```text
467
- finite_difference(position_world) ~= stored_linear_velocity
468
- ```
469
-
470
- on contact-free segments, and assert static fixtures have zero velocity.
471
-
472
- ### 3. Feature balance: 256D visual block should not dominate by raw concat
473
-
474
- The dataset stores typed feature blocks. It does not recommend feeding a raw 300D+ concatenation directly into a GNN.
475
-
476
- Downstream models should use per-block projections:
477
-
478
- ```text
479
- static_proj = MLP(node_static_feats)
480
- dynamic_proj = MLP(node_dynamic_feats)
481
- view_proj = PerViewEncoder(view_geom_feats, visual_views, view_visible)
482
- edge_proj = EdgeEncoder(rel_state, rel_prior)
483
- ```
484
-
485
- Then fuse into common `d_model` tokens.
486
-
487
- Export rules:
488
-
489
- - L2-normalize masked visual embeddings.
490
- - Store per-block normalization stats.
491
- - Keep visual features physically separate from symbolic state features.
492
- - Publish a `symbolic_only_v1_1` tensor view for ablation.
493
- - Treat the old flat `node_feats` as a compatibility view, not the only model input.
494
-
495
- ### 4. Final v1.1 tensor layout
496
-
497
- Published graph tensor file:
498
-
499
- ```text
500
- graph_tensors.npz
501
- node_feats float32[T, N_max, 323] # flat compatibility typed-block view
502
- node_mask bool[N_max]
503
- category_ids int16[N_max]
504
-
505
- visual_views float16[T, N_max, 3, 256]
506
- view_visible bool[T, N_max, 3]
507
- view_centroid float16[T, N_max, 3, 2]
508
- view_area float16[T, N_max, 3, 1]
509
-
510
- rel_state float32[T, N_max, N_max, 8]
511
- rel_prior float32[N_max, N_max, 5]
512
- event_masks uint8[T, 13]
513
- ```
514
-
515
- `node_feats` v1.1 slicing map, D = 323:
516
-
517
- ```text
518
- [0:256] visual_256 canonical-side visual feature = visual_views[:, :, 0]
519
- [256:259] pos_world_3
520
- [259:263] quat_xyzw_4
521
- [263:266] linvel_world_3
522
- [266:269] angvel_world_3
523
- [269:270] qpos_norm_1
524
- [270:271] qvel_norm_1
525
- [271:272] binary_state_1
526
- [272:274] movability_2 [free_movable, articulated]
527
- [274:275] robot_contact_1
528
- [275:276] held_1
529
- [276:279] visibility_3 [side_right, side_left, wrist]
530
- [279:291] family_12
531
- [291:323] type_clip_32
532
- ```
533
-
534
- ### 5. Updated node families
535
-
536
- Use 12 frozen family slots. Family is the relational role, not the full semantic class. Semantic class is carried by `category_text`, `category_id`, and CLIP type encoding.
537
-
538
- ```text
539
- 0 object free movable item: mug, can, food
540
- 1 distractor free movable non-task item; metadata-derived, not language-derived
541
- 2 surface static support plane: counter, stove top
542
- 3 receptacle containment volume: cabinet/drawer/fridge/sink basin
543
- 4 fixture appliance/furniture body: stove, microwave, kettle, blender, fridge
544
- 5 articulated_part door, drawer, lid, rack, mixer head
545
- 6 handle grasp point rigidly attached to articulated part
546
- 7 control knob, button, switch, faucet lever; actuates fixture state
547
- 8 region named zone: burner zone, rack slot, navigation region; v1 optional/reserved
548
- 9 robot optional aggregate robot/TCP node for ablations
549
- 10 reserved
550
- 11 reserved
551
- ```
552
-
553
- `appliance_part` is removed because it is ambiguous. Use `articulated_part`, `handle`, or `control` instead.
554
-
555
- ### 6. Updated relation tensors
556
-
557
- State relation tensor:
558
-
559
- ```text
560
- rel_state: float32[T, N_max, N_max, 8]
561
- channels:
562
- contact
563
- support
564
- near
565
- inside
566
- rel_dx
567
- rel_dy
568
- rel_dz
569
- dist_norm
570
- ```
571
-
572
- Prior relation tensor:
573
-
574
- ```text
575
- rel_prior: float32[N_max, N_max, 5]
576
- channels:
577
- part_of
578
- controls
579
- same_fixture_group
580
- can_contain
581
- can_support
582
- ```
583
-
584
- Direction conventions:
585
-
586
- ```text
587
- support[i,j] = 1 means node i rests on/supports-contact with node j as support destination
588
- inside[i,j] = 1 means node i is inside node j
589
- part_of[i,j] = 1 means node i is part of node j
590
- controls[i,j] = 1 means node i actuates/controls node j
591
- can_contain[i,j] = 1 means node i can contain node j
592
- can_support[i,j] = 1 means node i can support node j
593
- ```
594
-
595
- Robot contact and held state are node flags by default. Robot-object edges are created only in a robot-node ablation.
596
-
597
- ### 7. Vocabulary information
598
-
599
- Node vocabulary is included:
600
-
601
- ```text
602
- category_text
603
- category_id
604
- type_clip_32
605
- full CLIP 512D type table
606
- ```
607
-
608
- Edge vocabulary is primarily discrete and rule-table based:
609
-
610
- ```text
611
- relation channel IDs
612
- human-reviewed affordance matrix
613
- sim kinematic tree relations
614
- ```
615
-
616
- Optional metadata may include CLIP embeddings of relation names, but relation CLIP vectors are not part of the default relation tensor.
617
-
618
- Reasoning/VLM/LLM policy:
619
-
620
- - No reasoning-model dependency in sim v1.
621
- - LLM may draft rule tables, but committed source is `human_reviewed_rule_table`.
622
- - `category_text` comes only from fixed rename tables keyed by asset/sim metadata; no per-episode language edits.
623
- - No reasoning output is allowed for contact, support, held state, qpos, current inside state, or physical relations.
624
-
625
- ### 8. Feature source table
626
-
627
- | Feature | Source in v1 | Needs CLIP/VLM/LLM? |
628
- |---|---|---|
629
- | node inventory | sim metadata + deterministic grouping rules | no |
630
- | body/geom/joint IDs | MuJoCo model | no |
631
- | family | deterministic role rules | no |
632
- | category_text/category_id | fixed rename table from sim metadata | no |
633
- | type_clip_32 | frozen CLIP text encoder | CLIP yes, VLM/LLM no |
634
- | RGB | replay render or stored video | no |
635
- | masks/segmentation | MuJoCo segmentation render | no |
636
- | bbox/centroid/area | masks | no |
637
- | visual_views 256D | masked RGB visual encoder pooled by oracle mask | visual encoder yes; not reasoning |
638
- | pose/orientation | sim state xpose/xquat | no |
639
- | velocity | `mj_objectVelocity`; FD only QA/fallback | no |
640
- | qpos/qvel | sim qpos/qvel via joint addresses | no |
641
- | binary state | qpos/state thresholds | no |
642
- | contact/support | sim contacts + deterministic filter/rule | no |
643
- | inside/near/relative geometry | sim pose/AABB geometry | no |
644
- | part_of/controls | kinematic tree/fixture metadata | no |
645
- | can_contain/can_support | human-reviewed rule table | no LLM dependency |
646
- | target labels | task metadata | supervision/eval only |
647
- | depth-derived geometry | not in v1 | not available |
648
-
649
- ### 9. New sanity checks
650
-
651
- - Swapping instruction text must not change node features, edge features, node inventory, or relation tensors.
652
- - A node hidden in one camera but visible in another remains one global node.
653
- - `visual_views[t,n,v]` is valid only when `view_visible[t,n,v]` is true.
654
- - `visual_views[:, :, 0]` must match `node_feats[:, :, 0:256]` for the compatibility block.
655
- - Every category ID resolves in the type table.
656
- - Static fixtures have zero velocity.
657
- - FD velocity approximately agrees with stored velocity on contact-free segments.
658
- - Affordance channels must reproduce exactly from the published matrix gather.
659
- - Event vocabulary must match across README, SCHEMA, relation vocab, and exporter output.
 
1
+ # GWAM_Data v1.2 sparse-v2 schema
2
 
3
+ This file mirrors the root `SCHEMA.md`. The current v1.2 sparse-v2 export uses:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
 
5
  ```text
6
+ graph/node_state.npz: node_state float32[T, 256, 32]
7
+ graph/view_evidence.npz
8
+ graph/dynamic_edges.jsonl with contact + visibility_change
9
+ graph/visible_masks_rle.jsonl.gz with row-major binary RLE v2_vectorized
10
+ audit/phase2_summary.json after Phase 2
11
+ sparse visible-only Phase 2 visual features
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  ```
13
 
14
+ Old dense v1/v1.1 concepts are historical only and are not emitted by v1.2 sparse-v2:
15
 
16
  ```text
17
+ 317-D / 323-D node_feats
18
+ dense rel_state or rel_prior tensors
19
+ distractor as family index 1
20
+ events.jsonl state_on/state_off / grasp / release vocab
21
+ dense visual_views[T,N,3,256]
22
+ min_visible_px=10 or RLE v1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  ```
24
 
25
+ Current family ids:
26
 
27
  ```text
28
+ 0 object, including distractors
29
+ 1 reserved / forbidden old distractor id
30
+ 2 surface
31
+ 3 receptacle
32
+ 4 fixture
33
+ 5 articulated_part
34
+ 6 handle
35
+ 7 control, defined but unpopulated
36
+ 8 region, defined but unpopulated
37
+ 9 robot
38
  ```
39
 
40
+ Loaders must read `node_state_schema`, gate on the active channel before using padded rows, and treat instruction/goal/object-role metadata as supervision-only unless an experiment explicitly allows it.
 
 
 
 
41
 
42
+ See root `README.md` and root `SCHEMA.md` for the full normative contract.
43
 
 
44
 
45
+ ## Live real-time environment graph compatibility
 
 
 
 
 
 
 
46
 
47
+ The on-disk release stores full episodes, while the real-time extractor returns one current simulator frame at a time. They use the same schema vocabulary:
48
 
49
  ```text
50
+ on-disk episode: node_state float32[T,256,32]
51
+ live current frame: node_state float32[256,32]
52
+ live K-frame buffer: node_state float32[K,256,32]
 
53
  ```
54
 
55
+ The live extractor in `realtime/gwam_realtime_env_graph.py` / `extractors/gwam_realtime_env_graph.py` uses the same:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
 
57
  ```text
58
+ node_state_schema
59
+ family ids
60
+ active-mask policy
61
+ static prior edge labels: part_of, controls
62
+ dynamic edge labels: contact, visibility_change
63
+ view_evidence fields and normalized [0,1] units
64
+ row-major RLE mask codec when masks are requested
 
 
 
 
 
65
  ```
66
 
67
+ Real-time extraction is for users with their own RoboCasa/robosuite environment and assets. It constructs a current-observed graph from the current simulator state and segmentation renders. It does not compute the offline Phase-2 SAM2/CLIP `visual_features_sparse.npz` by default. Future simulator states, future robot nodes, future contacts, goal-derived target-node ids, object role labels, and instruction-derived target edges are not default-safe evaluation inputs; use them only in explicitly labeled oracle or teacher-forced modes.