fix(robocasa): restrict obj_registries to lightwheel by default

CloseFridge (and most kitchen tasks) crashed at reset with
`ValueError: Probabilities contain NaN` coming out of
`sample_kitchen_object_helper`. RoboCasa's upstream default
`obj_registries=("objaverse", "lightwheel")` normalizes per-registry
candidate counts as probabilities; when a sampled category has zero
mjcf paths in every configured registry (because the objaverse asset
pack isn't on disk — ~30GB, skipped by our Docker build), the 0/0
divide yields NaNs and `rng.choice` raises.

- Add `obj_registries: list[str] = ["lightwheel"]` to `RoboCasaEnv`
  config; thread it through `create_robocasa_envs`, `_make_env_fns`,
  and the gym.Env wrapper to the underlying `RoboCasaGymEnv` (which
  forwards to `create_env` → `robosuite.make` → kitchen env).
- Default matches what `download_kitchen_assets --type objs_lw`
  actually ships, so the env works out of the box without a 30GB
  objaverse download.
- Document the override (`--env.obj_registries='[objaverse,lightwheel]'`)
  for users who have downloaded the full asset set.

Made-with: Cursor
This commit is contained in:
Pepijn
2026-04-17 12:06:30 +01:00
parent 90819482f5
commit 81ee2952a3
3 changed files with 39 additions and 2 deletions
+13 -1
View File
@@ -32,7 +32,13 @@ After following the LeRobot installation instructions:
```bash
pip install -e ".[robocasa]"
python -m robocasa.scripts.setup_macros
python -m robocasa.scripts.download_kitchen_assets
# Lightweight assets only (lightwheel registry, ~2GB). Enough for the
# default env out of the box.
python -m robocasa.scripts.download_kitchen_assets --type tex fixtures_lw objs_lw
# Optional: full objaverse/aigen registries (~30GB) for richer object
# variety. If you download these, pass them via `--env.obj_registries`
# at eval/train time (see below).
# python -m robocasa.scripts.download_kitchen_assets --type objaverse
```
<Tip>
@@ -44,6 +50,12 @@ export MUJOCO_GL=egl # for headless servers (HPC, cloud)
</Tip>
By default the env samples objects only from the `lightwheel` registry (the one shipped by `--type objs_lw`), which avoids a `Probabilities contain NaN` crash when the objaverse/aigen packs are absent. If you've downloaded the full asset set, enable it with:
```bash
--env.obj_registries='[objaverse,lightwheel]'
```
## Policy inputs and outputs
**Observations** (raw RoboCasa camera names are preserved verbatim):