opentau.envs.configs

This module contains configuration files for different environments. LIBERO and RoboCasa365 are supported.

Classes

EnvConfig(import_name, make_id, task, fps, ...)

Base configuration for an environment.

EnvMetadataConfig([speed, quality, mistake, ...])

Optional pi07 metadata fields, broadcast across the rollout batch.

LiberoEnv(import_name, make_id, task, fps, ...)

Configuration for the LIBERO environment.

RoboCasaEnv(import_name, make_id, task, fps, ...)

Configuration for the RoboCasa365 kitchen environment.

class opentau.envs.configs.EnvConfig(import_name: str | None = None, make_id: str | None = None, task: str | None = None, fps: int = 30, features: dict[str, ~opentau.configs.types.PolicyFeature] = <factory>, features_map: dict[str, str] = <factory>, max_parallel_tasks: int = 1, disable_env_checker: bool = True, metadata: ~opentau.envs.configs.EnvMetadataConfig = <factory>)[source]

Bases: ChoiceRegistry, ABC

Base configuration for an environment.

Parameters:
  • import_name – Name under which the environment should be imported. For LIBERO, this doesn’t need to be set.

  • make_id – Gymnasium/Gym environment id (e.g., "CartPole-v1") when using gym.make-style construction.

  • task – Optional task or suite identifier understood by the environment.

  • fps – Target stepping frequency in Hz. Exact meaning is env-specific; for LIBERO it is the robosuite control frequency (LiberoEnv overrides the default to 20).

  • features – Mapping from logical feature names (e.g., "action", "pixels/agentview_image") to PolicyFeature definitions consumed by policies.

  • features_map – Mapping from environment keys to standardized OpenTau keys (e.g., mapping env observations into OBS_IMAGES / OBS_STATE).

  • max_parallel_tasks – Maximum number of tasks to run in parallel within the env.

  • disable_env_checker – Whether to disable Gymnasium environment checking.

  • metadata – Optional pi07 metadata fields (speed/quality/mistake/ robot_type/control_mode) broadcast across the eval batch. Defaults to all-None (no metadata injected).

__init__(import_name: str | None = None, make_id: str | None = None, task: str | None = None, fps: int = 30, features: dict[str, ~opentau.configs.types.PolicyFeature] = <factory>, features_map: dict[str, str] = <factory>, max_parallel_tasks: int = 1, disable_env_checker: bool = True, metadata: ~opentau.envs.configs.EnvMetadataConfig = <factory>) None
disable_env_checker: bool = True
features: dict[str, PolicyFeature]
features_map: dict[str, str]
fps: int = 30
abstract property gym_kwargs: dict

Keyword arguments used to construct the environment.

Subclasses must implement this to return the kwargs consumed by the project’s environment builder (often gym.make or an equivalent factory).

Returns:

A dict of keyword arguments for environment construction.

import_name: str = None
make_id: str = None
max_parallel_tasks: int = 1
metadata: EnvMetadataConfig
task: str | None = None
property type: str

Return the registered choice name for this config.

Returns:

The draccus choice name used in configs/CLI.

class opentau.envs.configs.EnvMetadataConfig(speed: int | None = None, quality: int | None = None, mistake: bool | None = None, robot_type: str | None = None, control_mode: Literal['joint', 'ee'] | None = None, emit_fps: bool = False)[source]

Bases: object

Optional pi07 metadata fields, broadcast across the rollout batch.

These describe properties of the environment / robot / demonstration style that the pi07 prefix tokenizes as a "Metadata: ..." segment. They live on the env config (not the eval config) because they’re properties of what is being run, not how many episodes to run.

Each field defaults to None — the corresponding batch key is omitted and the policy’s prepare_metadata pad path produces no segment in the prefix. Set a value to inject it for every env in the rollout. Allowed values mirror the training-time distribution emitted by BaseDataset._emit_optional_keys().

Only the pi07 family of policies consumes these keys today; setting them when evaluating another policy (e.g. pi0, pi05) will pass validation but the values will be ignored downstream.

Parameters:
  • speed – Integer in [0, 100] and a multiple of SPEED_BUCKET_STEP (= 10), or None. Matches the per-task percentile-rank bucket used at training time (0 = fastest decile, 100 = slowest); see opentau.datasets.speed_percentiles.

  • quality – Integer in [1, 5], or None.

  • mistakeTrue / False, or None. Note that False is semantically distinct from None: False emits a "Mistake: False" segment into the prefix, None omits the segment entirely.

  • robot_type – Non-empty robot identifier string (e.g. "UR5"), or None.

  • control_mode"joint" (joint-position control) or "ee" (end-effector control), or None.

  • emit_fps – Whether to broadcast EnvConfig.fps as the fps metadata field at inference (paralleling DatasetMixtureConfig.emit_fps at training time). Defaults to False — fps conditioning is opt-in so old checkpoints resume cleanly (no surprise FPS: segment in the policy’s metadata prefix). Flip to True for checkpoints trained with the training-side emit_fps=True.

__init__(speed: int | None = None, quality: int | None = None, mistake: bool | None = None, robot_type: str | None = None, control_mode: Literal['joint', 'ee'] | None = None, emit_fps: bool = False) None
control_mode: Literal['joint', 'ee'] | None = None
emit_fps: bool = False
mistake: bool | None = None
quality: int | None = None
robot_type: str | None = None
speed: int | None = None
class opentau.envs.configs.LiberoEnv(import_name: str | None = None, make_id: str | None = None, task: str = 'libero_10', fps: int = 20, features: dict[str, ~opentau.configs.types.PolicyFeature] = <factory>, features_map: dict[str, str] = <factory>, max_parallel_tasks: int = 1, disable_env_checker: bool = True, metadata: ~opentau.envs.configs.EnvMetadataConfig = <factory>, task_ids: list[int] | None = None, episode_length: int = 520, obs_type: str = 'pixels_agent_pos', render_mode: str = 'rgb_array', camera_name: str = 'agentview_image, robot0_eye_in_hand_image', init_states: bool = True, camera_name_mapping: dict[str, str] | None = None, subgoal_source: str | None = None)[source]

Bases: EnvConfig

Configuration for the LIBERO environment.

Parameters:
  • task – The LIBERO task or suite to use (e.g., "libero_10").

  • task_ids – Optional list of specific task IDs within the suite to use (if None, all tasks in the suite are used).

  • fps – Robosuite control frequency (Hz) for the LIBERO sim — the rate at which each env.step advances the simulation. Threaded through to OffScreenRenderEnv(control_freq=...). Defaults to 20, robosuite’s native LIBERO rate (the value used before this field was wired up).

  • episode_length – Maximum length of each episode in steps.

  • obs_type – Type of observations to use (e.g., "pixels_agent_pos").

  • render_mode – Rendering mode for the environment (e.g., "rgb_array").

  • camera_name – Comma-separated LIBERO raw camera names to render — both count and ordering of LIBERO cameras at eval are driven by this string. Defaults to "agentview_image,robot0_eye_in_hand_image" (agentview + wrist eye-in-hand). Set to "agentview_image" (single camera) for agentview-only rollouts. When the underlying policy was trained with a larger cfg.num_cams (e.g. a multi-domain mixture with 4 camera slots), preprocess_observation zero-fills the remaining cameraN slots so the train↔eval input structure stays aligned — independent of how many real LIBERO cameras this field renders.

  • init_states – Whether to initialize states randomly.

  • camera_name_mapping – Optional mapping from camera names to standardized keys.

  • subgoal_source – HuggingFace repo id of the v2.1 LeRobot dataset to source subgoal images from at eval time, or None to disable subgoal injection. When set (today only "TensorAuto/libero" is exercised), opentau.scripts.eval.eval() constructs a LiberoLastFrameSubgoalGenerator that samples a random matching episode per env at each rollout() call and serves its last frame as the subgoal — matching the pi07 low-level / pi07-paligemma training-time subgoal{k} input. Behavior with repos other than "TensorAuto/libero" is undefined.

  • features – Mapping from logical feature names to PolicyFeature definitions.

  • features_map – Mapping from environment keys to standardized OpenTau keys.

__init__(import_name: str | None = None, make_id: str | None = None, task: str = 'libero_10', fps: int = 20, features: dict[str, ~opentau.configs.types.PolicyFeature] = <factory>, features_map: dict[str, str] = <factory>, max_parallel_tasks: int = 1, disable_env_checker: bool = True, metadata: ~opentau.envs.configs.EnvMetadataConfig = <factory>, task_ids: list[int] | None = None, episode_length: int = 520, obs_type: str = 'pixels_agent_pos', render_mode: str = 'rgb_array', camera_name: str = 'agentview_image, robot0_eye_in_hand_image', init_states: bool = True, camera_name_mapping: dict[str, str] | None = None, subgoal_source: str | None = None) None
camera_name: str = 'agentview_image,robot0_eye_in_hand_image'
camera_name_mapping: dict[str, str] | None = None
episode_length: int = 520
features: dict[str, PolicyFeature]
features_map: dict[str, str]
fps: int = 20
property gym_kwargs: dict

Return the keyword arguments used to construct the LIBERO environment.

init_states: bool = True
obs_type: str = 'pixels_agent_pos'
render_mode: str = 'rgb_array'
subgoal_source: str | None = None
task: str = 'libero_10'
task_ids: list[int] | None = None
class opentau.envs.configs.RoboCasaEnv(import_name: str | None = None, make_id: str | None = None, task: str = 'CloseFridge', fps: int = 20, features: dict[str, ~opentau.configs.types.PolicyFeature] = <factory>, features_map: dict[str, str] = <factory>, max_parallel_tasks: int = 1, disable_env_checker: bool = True, metadata: ~opentau.envs.configs.EnvMetadataConfig = <factory>, episode_length: int | None = 1000, obs_type: str = 'pixels_agent_pos', render_mode: str = 'rgb_array', camera_name: str = 'robot0_agentview_left, robot0_eye_in_hand, robot0_agentview_right', observation_height: int = 256, observation_width: int = 256, visualization_height: int = 512, visualization_width: int = 512, split: str | None = None, obj_registries: list[str] = <factory>, assets_root: str | None = None, auto_download_assets: bool = True, subgoal_frames_dirs: str | None = None)[source]

Bases: EnvConfig

Configuration for the RoboCasa365 kitchen environment.

RoboCasa runs on robosuite 1.5 (shared with LIBERO since the libero extra was bumped to robosuite 1.5.2), so it co-installs in the same venv. The default robot is the PandaOmron mobile manipulator — hence the 12-D action and 16-D state, distinct from LIBERO’s 7-D/8-D. Set metadata.robot_type / eval.control_mode to select the matching per-(robot_type, control_mode) projection head when evaluating a co-trained policy.

Parameters:
  • task – A RoboCasa task name (e.g. "CloseFridge"), a comma-separated list of task names, or a benchmark-group shortcut (atomic_seen/composite_seen/composite_unseen/ pretrain50/pretrain100/pretrain200/pretrain300), which auto-expands to the upstream task list and auto-sets split.

  • fps – RoboCasa control frequency (Hz); also the render_fps for videos.

  • episode_length – Maximum steps per episode (_max_episode_steps). Defaults to 1000; set to null (None) to use RoboCasa’s official per-task horizon from the dataset registry (e.g. OpenCabinet=1050, TurnOnMicrowave=450) instead of a single global cap.

  • obs_type"pixels" or "pixels_agent_pos".

  • render_mode – Rendering mode for the environment.

  • camera_name – Comma-separated raw RoboCasa camera names to render. The wrapper remaps them to camera0/camera1/… so the policy input structure matches LIBERO regardless of the raw names; when the policy was trained with a larger cfg.num_cams, preprocess_observation zero-fills the remaining slots.

  • observation_height – Height of observation images.

  • observation_width – Width of observation images.

  • visualization_height – Height of visualization frames.

  • visualization_width – Width of visualization frames.

  • split – RoboCasa dataset split (None/"all"/"pretrain"/ "target"). Defaults to "pretrain" when left None — every task-group shortcut and concrete single-task config resolves to the pretrain kitchen-scene distribution; set explicitly to override.

  • obj_registries – Object-mesh registries to sample assets from. Defaults to ["lightwheel"] (the pack the asset downloader ships by default); add "objaverse" only after downloading that ~30GB pack.

  • assets_root – Directory to store/read RoboCasa kitchen assets, kept outside the (ephemeral) uv venv. None resolves to the ROBOCASA_ASSETS_ROOT env var, else HF_OPENTAU_HOME/robocasa/assets.

  • auto_download_assets – If True (default), the asset packs obj_registries needs are downloaded automatically (once) on first env build.

  • features – Mapping from logical feature names to PolicyFeature definitions.

  • features_map – Mapping from environment keys to standardized OpenTau keys.

  • subgoal_frames_dirs – Comma-separated list of goal_frames/ directories (each with a manifest.csv + the per-(task, seed, decoder, camera) .png files harvested from successful rollouts). When set, eval feeds the harvested terminal frame of the same scene seed as the subgoal image whenever one is available for that (task, seed); scenes with no harvested success get no subgoal (padded). Probes how much a perfect goal-image (world-model output) would help. Requires a pinned eval.seed so the seed→scene map matches the harvest. None (default) = no subgoal conditioning.

__init__(import_name: str | None = None, make_id: str | None = None, task: str = 'CloseFridge', fps: int = 20, features: dict[str, ~opentau.configs.types.PolicyFeature] = <factory>, features_map: dict[str, str] = <factory>, max_parallel_tasks: int = 1, disable_env_checker: bool = True, metadata: ~opentau.envs.configs.EnvMetadataConfig = <factory>, episode_length: int | None = 1000, obs_type: str = 'pixels_agent_pos', render_mode: str = 'rgb_array', camera_name: str = 'robot0_agentview_left, robot0_eye_in_hand, robot0_agentview_right', observation_height: int = 256, observation_width: int = 256, visualization_height: int = 512, visualization_width: int = 512, split: str | None = None, obj_registries: list[str] = <factory>, assets_root: str | None = None, auto_download_assets: bool = True, subgoal_frames_dirs: str | None = None) None
assets_root: str | None = None
auto_download_assets: bool = True
camera_name: str = 'robot0_agentview_left,robot0_eye_in_hand,robot0_agentview_right'
episode_length: int | None = 1000
features: dict[str, PolicyFeature]
features_map: dict[str, str]
fps: int = 20
property gym_kwargs: dict

Return the keyword arguments used to construct the RoboCasa environment.

Task resolution and per-rank sharding live in create_robocasa_envs (they need the robocasa package for group expansion), so this stays sim-free and only carries the obs/render parameters plus an optional split.

obj_registries: list[str]
obs_type: str = 'pixels_agent_pos'
observation_height: int = 256
observation_width: int = 256
render_mode: str = 'rgb_array'
split: str | None = None
subgoal_frames_dirs: str | None = None
task: str = 'CloseFridge'
visualization_height: int = 512
visualization_width: int = 512