Skip to content

Task-format / infra unification (P0–P5): one contract, enforced by guardrail #792

Description

@geng-haoran

Tracking issue for the task-format / infrastructure unification effort. Goal: every task on one unified format & infra (BaseTaskEnv/RLTaskEnv, @register_task, scenario: ScenarioCfg, sanctioned _-hooks only, self.handler for sim), deeply integrated and kept aligned by an automated guardrail.

Audit covered 23 families / 362 task files. Canonical contract: MetaSim/metasim/task/{base.py,rl_task.py,registry.py,gym_registration.py}.

P0 — seed contract + guardrail ✅ (done)

P1 — eliminate illegal step/reset/close overrides (move logic to sanctioned hooks)

Mechanism: action transforms → pre_physics_step_callback (or an action hook); reward computed in step → _reward; per-reset state → reset_callback/_get_initial_states. As each family lands, remove it from the reset(seed) allowlist and extend the guardrail to ratchet step/close.

step overrides (42): simpler_env (13), pick_place (10), mujoco_playground (3), beyondmimic (3), robosuite (2), mjlab (2), maniskill (2), libero/humanoid_bench/humanoid/dm_control/calvin/benchmark (1 each).
leaf reset-without-seed (90): libero_90 (62 — uniform "skip checker reset" pattern, collapse via a base class flag), pick_place (7), simpler_env/maniskill (4), mujoco_playground/mjlab/beyondmimic (3), robosuite (2), …
close overrides (11): simpler_env (3), robosuite/beyondmimic (2), mjlab/libero/dm_control/benchmark (1).

  • libero_90: replace 62 leaf reset overrides with a _skip_checker_reset base flag (biggest mechanical win)
  • mujoco_playground (proof-of-pattern): move delta-action scaling → pre_physics_step_callback, reward → _reward, episode bookkeeping → _get_initial_states; drop step/reset overrides
  • pick_place: action delta path + tracking-state reset → callbacks; restore canonical reset signature; drop super(PickPlaceBase, self) MRO-skips
  • simpler_env / robosuite / maniskill _native: route step through handler.set_dof_targets/simulate/get_states (stop direct scene.step() / mj_step / set_drive_target) — parity-test each (cross-sim obs/reward)
  • mjlab / beyondmimic / humanoid / humanoid_bench / calvin / dm_control / benchmark / libero: per-family step/close cleanup

P2 — promote ManagerBasedRVEnv into metasim.task (Tier 2)

The manager-based RL base lives in roboverse_learn.managers; mjlab-v2/beyondmimic/humanoid build parallel manager stacks on it. Promote it to a sanctioned metasim.task base so those families have a blessed lineage; converge mjlab mdp/, beyondmimic mdp/, humanoid CallbacksCfg onto one shared mdp package (dedupe ~60% overlap).

P3 — merge duplicate bases

  • LiberoBaseTask ≈ Libero90BaseTask → one base (resolve the inverted checker-reset ordering)
  • mjlab v1 vs v2 dual task-IDs → deprecate v1
  • beyondmimic metasim vs isaaclab subtrees → one, with a backend selector

P4 — declare the 3 tiers explicitly + unify registration

  • Tier 1 native BaseTaskEnv; Tier 2 manager-based; Tier 3 external passthrough (gym registry).
  • Give passthrough families (robotwin/metaworld/myosuite/gym_robotics/dm_control/libero_plus/maniskill-v3) thin @register_task adapters so they're discoverable via list_tasks(), and document them as Tier 3.
  • Collapse the 3 competing SimplerEnv/ registrars into one; standardize registration prefixes to family.task (fix humanoid unitree_rl./g1./agibot_a2. and beyondmimic's missing prefix).

P5 — config standardization

max_episode_steps as class-var everywhere (not @property/instance/missing); prefer RobotCfg over bare robot strings; migrate DEFAULT_CONFIG-style dicts onto ScenarioCfg/@configclass.


Guardrail evolves with each P: the conformance test gains a step/close ratchet and a base-lineage check as the corresponding P lands, so unified format is enforced, not just achieved once.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions