# Extraction Plan: RoboCasa target Atomic-Seen Graph Dataset v1 ## Inputs RoboCasa target Atomic-Seen human datasets, 18 tasks: - `CloseBlenderLid`: `v1.0/target/atomic/CloseBlenderLid/20250822`, horizon 900 - `CloseFridge`: `v1.0/target/atomic/CloseFridge/20250816`, horizon 900 - `CloseToasterOvenDoor`: `v1.0/target/atomic/CloseToasterOvenDoor/20250818`, horizon 450 - `CoffeeSetupMug`: `v1.0/target/atomic/CoffeeSetupMug/20250813`, horizon 600 - `NavigateKitchen`: `v1.0/target/atomic/NavigateKitchen/20250821`, horizon 450 - `OpenCabinet`: `v1.0/target/atomic/OpenCabinet/20250813`, horizon 1050 - `OpenDrawer`: `v1.0/target/atomic/OpenDrawer/20250816`, horizon 750 - `OpenStandMixerHead`: `v1.0/target/atomic/OpenStandMixerHead/20250818`, horizon 450 - `PickPlaceCounterToCabinet`: `v1.0/target/atomic/PickPlaceCounterToCabinet/20250811`, horizon 750 - `PickPlaceCounterToStove`: `v1.0/target/atomic/PickPlaceCounterToStove/20250818`, horizon 600 - `PickPlaceDrawerToCounter`: `v1.0/target/atomic/PickPlaceDrawerToCounter/20250820`, horizon 750 - `PickPlaceSinkToCounter`: `v1.0/target/atomic/PickPlaceSinkToCounter/20250813`, horizon 900 - `PickPlaceToasterToCounter`: `v1.0/target/atomic/PickPlaceToasterToCounter/20250817`, horizon 600 - `SlideDishwasherRack`: `v1.0/target/atomic/SlideDishwasherRack/20250820`, horizon 450 - `TurnOffStove`: `v1.0/target/atomic/TurnOffStove/20250812`, horizon 750 - `TurnOnElectricKettle`: `v1.0/target/atomic/TurnOnElectricKettle/20250817`, horizon 450 - `TurnOnMicrowave`: `v1.0/target/atomic/TurnOnMicrowave/20250813`, horizon 450 - `TurnOnSinkFaucet`: `v1.0/target/atomic/TurnOnSinkFaucet/20250812`, horizon 600 ## V1 outputs For each episode, export: ```text RGB: side_right, side_left, wrist Segmentation/masks: side_right, side_left, wrist Robot state: T x 16 Action: T x 12 Reward/done/success Simulator state: qpos/qvel, body poses, contacts Graph: static nodes/prior edges + per-frame state edges + event labels + tensors ``` Depth is not exported in v1. ## Download command RoboCasa downloader supports: ```bash python -m robocasa.scripts.download_datasets --split target --source human --tasks ``` For the 18 target Atomic-Seen tasks, pass the task list from `docs/TARGET_ATOMIC_SEEN_TASKS.md`. Important: the downloader prompts for confirmation. Do not pipe automatic yes in shared/safety-managed environments. Confirm manually after checking disk. Current local inspection found about 562G free under `/home/chris` on 2026-07-02, but actual download size was not measured because automatic confirmation to the downloader was blocked by the safety gate. Use a manual dry run or inspect Box links before full download. ## Replay/extraction loop For each raw HDF5 episode: 1. Load `states`, `actions`, `model_file`, and `ep_meta`. 2. Create RoboCasa env from dataset metadata. 3. For each timestep `t`: - set simulator state to `states[t]`; - call `sim.forward()`; - render RGB for: - `robot0_agentview_right` -> `side_right`, - `robot0_agentview_left` -> `side_left`, - `robot0_eye_in_hand` -> `wrist`; - render MuJoCo segmentation for the same cameras; - map segmentation geom IDs to body IDs and graph node IDs; - read `sim.data.qpos`, `qvel`, `xpos`, `xquat`, contacts; - read/reconstruct robot state and action; - assemble per-frame graph record. 4. After episode, write graph tensors and event labels. 5. Run sanity checks before accepting episode. ## Graph inventory construction Inventory is frozen per episode: ```text object nodes: task objects + distractors surface nodes: counters, sink surfaces, stove top, etc. receptacle nodes: cabinets, drawers, fridge, sink basin, toaster oven, etc. fixture nodes: appliances/fixtures involved in task articulated_part nodes: doors, drawers, lids, racks, knobs/switches where relevant handle/control nodes: handles, knobs, faucet handle, buttons where visible/controllable optional robot node: off by default ``` Use deterministic `node_grouping_.yaml`; do not let language decide which nodes exist. ## Contact filtering Filter raw MuJoCo contacts by: - geom-to-node mappability; - dropping fixture-fixture static contacts; - aggregating multiple geom contacts into one node pair; - recording count/min distance; - keeping robot-object contacts separately from object-surface support. ## Segmentation output Each segmentation file should map node IDs to masks: ```text seg/side_right/frame_000123.npz node_ids: string array masks_rle or masks_bool packed geom_ids_by_node visible flags ``` ## Acceptance gates An episode is accepted only if: - RGB, segmentation, state, action, and graph frame counts match exactly. - Every visible mask maps to a known node or documented ignored geom class. - `rel_state` contains no prior or goal channels. - `rel_prior` contains no instruction-specific target edges. - State/action shapes are `(T, 16)` and `(T, 12)`. - Required camera files exist for side_right, side_left, wrist. - Per-task event expectations are roughly satisfied, or the episode is quarantined with reason.