diff --git a/README.md b/README.md index 9bdd445a1..cc78ee2b9 100644 --- a/README.md +++ b/README.md @@ -76,12 +76,12 @@ You may wish to only access individual environments used in the Metaworld benchm ### Seeding a Benchmark Instance For the purposes of reproducibility, it may be important to you to seed your benchmark instance. -For example, for the ML1 benchmark environment with the 'pick-place-v2' environment, you can do so in the following way: +For example, for the ML1 benchmark environment with the 'pick-place-V3' environment, you can do so in the following way: ```python import metaworld SEED = 0 # some seed number here -benchmark = metaworld.ML1('pick-place-v2', seed=SEED) +benchmark = metaworld.ML1('pick-place-V3', seed=SEED) ``` ### Running ML1 or MT1 @@ -91,9 +91,9 @@ import random print(metaworld.ML1.ENV_NAMES) # Check out the available environments -ml1 = metaworld.ML1('pick-place-v2') # Construct the benchmark, sampling tasks +ml1 = metaworld.ML1('pick-place-V3') # Construct the benchmark, sampling tasks -env = ml1.train_classes['pick-place-v2']() # Create an environment with task `pick_place` +env = ml1.train_classes['pick-place-V3']() # Create an environment with task `pick_place` task = random.choice(ml1.train_tasks) env.set_task(task) # Set task @@ -152,15 +152,15 @@ environments respectively. You can access them in the following way: ```python -from metaworld.envs import (ALL_V2_ENVIRONMENTS_GOAL_OBSERVABLE, - ALL_V2_ENVIRONMENTS_GOAL_HIDDEN) +from metaworld.envs import (ALL_V3_ENVIRONMENTS_GOAL_OBSERVABLE, + ALL_V3_ENVIRONMENTS_GOAL_HIDDEN) # these are ordered dicts where the key : value # is env_name : env_constructor import numpy as np -door_open_goal_observable_cls = ALL_V2_ENVIRONMENTS_GOAL_OBSERVABLE["door-open-v2-goal-observable"] -door_open_goal_hidden_cls = ALL_V2_ENVIRONMENTS_GOAL_HIDDEN["door-open-v2-goal-hidden"] +door_open_goal_observable_cls = ALL_V3_ENVIRONMENTS_GOAL_OBSERVABLE["door-open-V3-goal-observable"] +door_open_goal_hidden_cls = ALL_V3_ENVIRONMENTS_GOAL_HIDDEN["door-open-V3-goal-hidden"] env = door_open_goal_hidden_cls() env.reset() # Reset environment @@ -171,15 +171,15 @@ assert (obs[-3:] == np.zeros(3)).all() # goal will be zeroed out because env is # You can choose to initialize the random seed of the environment. # The state of your rng will remain unaffected after the environment is constructed. env1 = door_open_goal_observable_cls(seed=5) -env2 = door_open_goal_observable_cls(seed=5) +enV3 = door_open_goal_observable_cls(seed=5) env1.reset() # Reset environment -env2.reset() +enV3.reset() a1 = env1.action_space.sample() # Sample an action -a2 = env2.action_space.sample() +a2 = enV3.action_space.sample() next_obs1, _, _, _ = env1.step(a1) # Step the environment with the sampled random action -next_obs2, _, _, _ = env2.step(a2) +next_obs2, _, _, _ = enV3.step(a2) assert (next_obs1[-3:] == next_obs2[-3:]).all() # 2 envs initialized with the same seed will have the same goal assert not (next_obs2[-3:] == np.zeros(3)).all() # The env's are goal observable, meaning the goal is not zero'd out diff --git a/docs/index.md b/docs/index.md index d6c57e091..93a386cb9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -25,9 +25,9 @@ import random print(metaworld.ML1.ENV_NAMES) # Check out the available environments -ml1 = metaworld.ML1('pick-place-v2') # Construct the benchmark, sampling tasks +ml1 = metaworld.ML1('pick-place-V3') # Construct the benchmark, sampling tasks -env = ml1.train_classes['pick-place-v2']() # Create an environment with task `pick_place` +env = ml1.train_classes['pick-place-V3']() # Create an environment with task `pick_place` task = random.choice(ml1.train_tasks) env.set_task(task) # Set task diff --git a/docs/introduction/basic_usage.md b/docs/introduction/basic_usage.md index 3580e733d..25151968d 100644 --- a/docs/introduction/basic_usage.md +++ b/docs/introduction/basic_usage.md @@ -33,12 +33,12 @@ You may wish to only access individual environments used in the Metaworld benchm ### Seeding a Benchmark Instance For the purposes of reproducibility, it may be important to you to seed your benchmark instance. -For example, for the ML1 benchmark environment with the 'pick-place-v2' environment, you can do so in the following way: +For example, for the ML1 benchmark environment with the 'pick-place-V3' environment, you can do so in the following way: ```python import metaworld SEED = 0 # some seed number here -benchmark = metaworld.ML1('pick-place-v2', seed=SEED) +benchmark = metaworld.ML1('pick-place-V3', seed=SEED) ``` ### Running ML1 or MT1 @@ -48,9 +48,9 @@ import random print(metaworld.ML1.ENV_NAMES) # Check out the available environments -ml1 = metaworld.ML1('pick-place-v2') # Construct the benchmark, sampling tasks +ml1 = metaworld.ML1('pick-place-V3') # Construct the benchmark, sampling tasks -env = ml1.train_classes['pick-place-v2']() # Create an environment with task `pick_place` +env = ml1.train_classes['pick-place-V3']() # Create an environment with task `pick_place` task = random.choice(ml1.train_tasks) env.set_task(task) # Set task @@ -111,15 +111,15 @@ environments respectively. You can access them in the following way: ```python -from metaworld.envs import (ALL_V2_ENVIRONMENTS_GOAL_OBSERVABLE, - ALL_V2_ENVIRONMENTS_GOAL_HIDDEN) +from metaworld.envs import (ALL_V3_ENVIRONMENTS_GOAL_OBSERVABLE, + ALL_V3_ENVIRONMENTS_GOAL_HIDDEN) # these are ordered dicts where the key : value # is env_name : env_constructor import numpy as np -door_open_goal_observable_cls = ALL_V2_ENVIRONMENTS_GOAL_OBSERVABLE["door-open-v2-goal-observable"] -door_open_goal_hidden_cls = ALL_V2_ENVIRONMENTS_GOAL_HIDDEN["door-open-v2-goal-hidden"] +door_open_goal_observable_cls = ALL_V3_ENVIRONMENTS_GOAL_OBSERVABLE["door-open-V3-goal-observable"] +door_open_goal_hidden_cls = ALL_V3_ENVIRONMENTS_GOAL_HIDDEN["door-open-V3-goal-hidden"] env = door_open_goal_hidden_cls() env.reset() # Reset environment diff --git a/metaworld/__init__.py b/metaworld/__init__.py index 0906e62fb..7645bfd49 100644 --- a/metaworld/__init__.py +++ b/metaworld/__init__.py @@ -25,9 +25,9 @@ import metaworld # type: ignore import metaworld.env_dict as _env_dict from metaworld.env_dict import ( - ALL_V2_ENVIRONMENTS, - ALL_V2_ENVIRONMENTS_GOAL_HIDDEN, - ALL_V2_ENVIRONMENTS_GOAL_OBSERVABLE, + ALL_V3_ENVIRONMENTS, + ALL_V3_ENVIRONMENTS_GOAL_HIDDEN, + ALL_V3_ENVIRONMENTS_GOAL_OBSERVABLE, ) from metaworld.sawyer_xyz_env import SawyerXYZEnv # type: ignore from metaworld.types import Task @@ -184,13 +184,13 @@ def _make_tasks( class MT1(Benchmark): """The MT1 benchmark. A goal-conditioned RL environment for a single Metaworld task.""" - ENV_NAMES = list(_env_dict.ALL_V2_ENVIRONMENTS.keys()) + ENV_NAMES = list(_env_dict.ALL_V3_ENVIRONMENTS.keys()) def __init__(self, env_name, seed=None): super().__init__() - if env_name not in _env_dict.ALL_V2_ENVIRONMENTS: - raise ValueError(f"{env_name} is not a V2 environment") - cls = _env_dict.ALL_V2_ENVIRONMENTS[env_name] + if env_name not in _env_dict.ALL_V3_ENVIRONMENTS: + raise ValueError(f"{env_name} is not a V3 environment") + cls = _env_dict.ALL_V3_ENVIRONMENTS[env_name] self._train_classes = OrderedDict([(env_name, cls)]) self._test_classes = OrderedDict([(env_name, cls)]) args_kwargs = _env_dict.ML1_args_kwargs[env_name] @@ -207,9 +207,9 @@ class MT10(Benchmark): def __init__(self, seed=None): super().__init__() - self._train_classes = _env_dict.MT10_V2 + self._train_classes = _env_dict.MT10_V3 self._test_classes = OrderedDict() - train_kwargs = _env_dict.MT10_V2_ARGS_KWARGS + train_kwargs = _env_dict.MT10_V3_ARGS_KWARGS self._train_tasks = _make_tasks( self._train_classes, train_kwargs, _MT_OVERRIDE, seed=seed ) @@ -223,9 +223,9 @@ class MT50(Benchmark): def __init__(self, seed=None): super().__init__() - self._train_classes = _env_dict.MT50_V2 + self._train_classes = _env_dict.MT50_V3 self._test_classes = OrderedDict() - train_kwargs = _env_dict.MT50_V2_ARGS_KWARGS + train_kwargs = _env_dict.MT50_V3_ARGS_KWARGS self._train_tasks = _make_tasks( self._train_classes, train_kwargs, _MT_OVERRIDE, seed=seed ) @@ -241,14 +241,14 @@ class ML1(Benchmark): """The ML1 benchmark. A meta-RL environment for a single Metaworld task. The train and test set contain different goal positions. The goal position is not part of the observation.""" - ENV_NAMES = list(_env_dict.ALL_V2_ENVIRONMENTS.keys()) + ENV_NAMES = list(_env_dict.ALL_V3_ENVIRONMENTS.keys()) def __init__(self, env_name, seed=None): super().__init__() - if env_name not in _env_dict.ALL_V2_ENVIRONMENTS: - raise ValueError(f"{env_name} is not a V2 environment") + if env_name not in _env_dict.ALL_V3_ENVIRONMENTS: + raise ValueError(f"{env_name} is not a V3 environment") - cls = _env_dict.ALL_V2_ENVIRONMENTS[env_name] + cls = _env_dict.ALL_V3_ENVIRONMENTS[env_name] self._train_classes = OrderedDict([(env_name, cls)]) self._test_classes = self._train_classes args_kwargs = _env_dict.ML1_args_kwargs[env_name] @@ -269,8 +269,8 @@ class ML10(Benchmark): def __init__(self, seed=None): super().__init__() - self._train_classes = _env_dict.ML10_V2["train"] - self._test_classes = _env_dict.ML10_V2["test"] + self._train_classes = _env_dict.ML10_V3["train"] + self._test_classes = _env_dict.ML10_V3["test"] train_kwargs = _env_dict.ML10_ARGS_KWARGS["train"] test_kwargs = _env_dict.ML10_ARGS_KWARGS["test"] @@ -288,8 +288,8 @@ class ML45(Benchmark): def __init__(self, seed=None): super().__init__() - self._train_classes = _env_dict.ML45_V2["train"] - self._test_classes = _env_dict.ML45_V2["test"] + self._train_classes = _env_dict.ML45_V3["train"] + self._test_classes = _env_dict.ML45_V3["test"] train_kwargs = _env_dict.ML45_ARGS_KWARGS["train"] test_kwargs = _env_dict.ML45_ARGS_KWARGS["test"] @@ -531,7 +531,7 @@ def init_each_env(env_cls: type[SawyerXYZEnv], name: str, seed: int) -> gym.Env: def register_mw_envs(): - for name in ALL_V2_ENVIRONMENTS: + for name in ALL_V3_ENVIRONMENTS: kwargs = {"name": "MT1-" + name} register( id=f"Meta-World/{name}", entry_point="metaworld:make_single", kwargs=kwargs @@ -549,21 +549,21 @@ def register_mw_envs(): kwargs=kwargs, ) - for name_hid in ALL_V2_ENVIRONMENTS_GOAL_HIDDEN: + for name_hid in ALL_V3_ENVIRONMENTS_GOAL_HIDDEN: kwargs = {} register( id=f"Meta-World/{name_hid}", - entry_point=lambda seed: ALL_V2_ENVIRONMENTS_GOAL_HIDDEN[name_hid]( + entry_point=lambda seed: ALL_V3_ENVIRONMENTS_GOAL_HIDDEN[name_hid]( seed=seed ), kwargs=kwargs, ) - for name_obs in ALL_V2_ENVIRONMENTS_GOAL_OBSERVABLE: + for name_obs in ALL_V3_ENVIRONMENTS_GOAL_OBSERVABLE: kwargs = {} register( id=f"Meta-World/{name_obs}", - entry_point=lambda seed: ALL_V2_ENVIRONMENTS_GOAL_OBSERVABLE[name_obs]( + entry_point=lambda seed: ALL_V3_ENVIRONMENTS_GOAL_OBSERVABLE[name_obs]( seed=seed ), kwargs=kwargs, @@ -582,7 +582,7 @@ def register_mw_envs(): seed=None if not seed else seed + idx, use_one_hot=use_one_hot, ) - for idx, env_name in enumerate(list(_env_dict.MT10_V2.keys())) + for idx, env_name in enumerate(list(_env_dict.MT10_V3.keys())) ] ), kwargs=kwargs, @@ -599,7 +599,7 @@ def register_mw_envs(): seed=None if not seed else seed + idx, use_one_hot=use_one_hot, ) - for idx, env_name in enumerate(list(_env_dict.MT50_V2.keys())) + for idx, env_name in enumerate(list(_env_dict.MT50_V3.keys())) ] ), kwargs=kwargs, @@ -617,7 +617,7 @@ def register_mw_envs(): seed=None if not seed else seed + idx, use_one_hot=use_one_hot, ) - for idx, env_name in enumerate(list(_env_dict.MT50_V2.keys())) + for idx, env_name in enumerate(list(_env_dict.MT50_V3.keys())) ] ), kwargs=kwargs, @@ -633,7 +633,7 @@ def register_mw_envs(): seed=None if not seed else seed + idx, use_one_hot=False, ) - for idx, env_name in enumerate(list(_env_dict.ML10_V2["train"].keys())) + for idx, env_name in enumerate(list(_env_dict.ML10_V3["train"].keys())) ] ), kwargs=kwargs, @@ -649,7 +649,7 @@ def register_mw_envs(): seed=None if not seed else seed + idx, use_one_hot=False, ) - for idx, env_name in enumerate(list(_env_dict.ML10_V2["test"].keys())) + for idx, env_name in enumerate(list(_env_dict.ML10_V3["test"].keys())) ] ), kwargs=kwargs, @@ -665,7 +665,7 @@ def register_mw_envs(): seed=None if not seed else seed + idx, use_one_hot=False, ) - for idx, env_name in enumerate(list(_env_dict.ML10_V2["train"].keys())) + for idx, env_name in enumerate(list(_env_dict.ML10_V3["train"].keys())) ] ), kwargs=kwargs, @@ -681,7 +681,7 @@ def register_mw_envs(): seed=None if not seed else seed + idx, use_one_hot=False, ) - for idx, env_name in enumerate(list(_env_dict.ML10_V2["test"].keys())) + for idx, env_name in enumerate(list(_env_dict.ML10_V3["test"].keys())) ] ), kwargs=kwargs, @@ -699,7 +699,7 @@ def register_mw_envs(): seed=None if not seed else seed + idx, use_one_hot=use_one_hot, ) - for idx, env_name in enumerate(list(_env_dict.MT10_V2.keys())) + for idx, env_name in enumerate(list(_env_dict.MT10_V3.keys())) ] ), kwargs=kwargs, @@ -782,7 +782,7 @@ def register_mw_envs(): "MT10", "ML45", "MT50", - "ALL_V2_ENVIRONMENTS_GOAL_HIDDEN", + "ALL_V3_ENVIRONMENTS_GOAL_HIDDEN", "ALL_V2_ENVIRONMENTS_GOAL_OBSERVABLE", "SawyerXYZEnv", ] diff --git a/metaworld/asset_path_utils.py b/metaworld/asset_path_utils.py index 5e4f8aa21..a1fd900f7 100644 --- a/metaworld/asset_path_utils.py +++ b/metaworld/asset_path_utils.py @@ -6,11 +6,11 @@ _CURRENT_FILE_DIR = Path(__file__).parent.absolute() -ENV_ASSET_DIR_V2 = _CURRENT_FILE_DIR / "assets" +ENV_ASSET_DIR_V3 = _CURRENT_FILE_DIR / "assets" -def full_v2_path_for(file_name: str) -> str: - """Retrieves the full, absolute path for a given V2 asset +def full_V3_path_for(file_name: str) -> str: + """Retrieves the full, absolute path for a given V3 asset Args: file_name: Name of the asset file. Can include subdirectories. @@ -18,4 +18,4 @@ def full_v2_path_for(file_name: str) -> str: Returns: The full path to the asset file. """ - return str(ENV_ASSET_DIR_V2 / file_name) + return str(ENV_ASSET_DIR_V3 / file_name) diff --git a/metaworld/assets/sawyer_xyz/sawyer_pick_place_v2.xml b/metaworld/assets/sawyer_xyz/sawyer_pick_place_v3.xml similarity index 100% rename from metaworld/assets/sawyer_xyz/sawyer_pick_place_v2.xml rename to metaworld/assets/sawyer_xyz/sawyer_pick_place_v3.xml diff --git a/metaworld/assets/sawyer_xyz/sawyer_pick_place_wall_v2.xml b/metaworld/assets/sawyer_xyz/sawyer_pick_place_wall_v3.xml similarity index 100% rename from metaworld/assets/sawyer_xyz/sawyer_pick_place_wall_v2.xml rename to metaworld/assets/sawyer_xyz/sawyer_pick_place_wall_v3.xml diff --git a/metaworld/assets/sawyer_xyz/sawyer_push_back_v2.xml b/metaworld/assets/sawyer_xyz/sawyer_push_back_v3.xml similarity index 100% rename from metaworld/assets/sawyer_xyz/sawyer_push_back_v2.xml rename to metaworld/assets/sawyer_xyz/sawyer_push_back_v3.xml diff --git a/metaworld/assets/sawyer_xyz/sawyer_push_v2.xml b/metaworld/assets/sawyer_xyz/sawyer_push_v3.xml similarity index 100% rename from metaworld/assets/sawyer_xyz/sawyer_push_v2.xml rename to metaworld/assets/sawyer_xyz/sawyer_push_v3.xml diff --git a/metaworld/assets/sawyer_xyz/sawyer_push_wall_v2.xml b/metaworld/assets/sawyer_xyz/sawyer_push_wall_v3.xml similarity index 100% rename from metaworld/assets/sawyer_xyz/sawyer_push_wall_v2.xml rename to metaworld/assets/sawyer_xyz/sawyer_push_wall_v3.xml diff --git a/metaworld/assets/sawyer_xyz/sawyer_reach_v2.xml b/metaworld/assets/sawyer_xyz/sawyer_reach_v3.xml similarity index 100% rename from metaworld/assets/sawyer_xyz/sawyer_reach_v2.xml rename to metaworld/assets/sawyer_xyz/sawyer_reach_v3.xml diff --git a/metaworld/assets/sawyer_xyz/sawyer_reach_wall_v2.xml b/metaworld/assets/sawyer_xyz/sawyer_reach_wall_v3.xml similarity index 100% rename from metaworld/assets/sawyer_xyz/sawyer_reach_wall_v2.xml rename to metaworld/assets/sawyer_xyz/sawyer_reach_wall_v3.xml diff --git a/metaworld/assets/sawyer_xyz/sawyer_sweep_v2.xml b/metaworld/assets/sawyer_xyz/sawyer_sweep_v3.xml similarity index 100% rename from metaworld/assets/sawyer_xyz/sawyer_sweep_v2.xml rename to metaworld/assets/sawyer_xyz/sawyer_sweep_v3.xml diff --git a/metaworld/env_dict.py b/metaworld/env_dict.py index 5b4c826c8..4afa5e5e4 100644 --- a/metaworld/env_dict.py +++ b/metaworld/env_dict.py @@ -24,56 +24,56 @@ ) ENV_CLS_MAP = { - "assembly-v2": envs.SawyerNutAssemblyEnvV2, - "basketball-v2": envs.SawyerBasketballEnvV2, - "bin-picking-v2": envs.SawyerBinPickingEnvV2, - "box-close-v2": envs.SawyerBoxCloseEnvV2, - "button-press-topdown-v2": envs.SawyerButtonPressTopdownEnvV2, - "button-press-topdown-wall-v2": envs.SawyerButtonPressTopdownWallEnvV2, - "button-press-v2": envs.SawyerButtonPressEnvV2, - "button-press-wall-v2": envs.SawyerButtonPressWallEnvV2, - "coffee-button-v2": envs.SawyerCoffeeButtonEnvV2, - "coffee-pull-v2": envs.SawyerCoffeePullEnvV2, - "coffee-push-v2": envs.SawyerCoffeePushEnvV2, - "dial-turn-v2": envs.SawyerDialTurnEnvV2, - "disassemble-v2": envs.SawyerNutDisassembleEnvV2, - "door-close-v2": envs.SawyerDoorCloseEnvV2, - "door-lock-v2": envs.SawyerDoorLockEnvV2, - "door-open-v2": envs.SawyerDoorEnvV2, - "door-unlock-v2": envs.SawyerDoorUnlockEnvV2, - "hand-insert-v2": envs.SawyerHandInsertEnvV2, - "drawer-close-v2": envs.SawyerDrawerCloseEnvV2, - "drawer-open-v2": envs.SawyerDrawerOpenEnvV2, - "faucet-open-v2": envs.SawyerFaucetOpenEnvV2, - "faucet-close-v2": envs.SawyerFaucetCloseEnvV2, - "hammer-v2": envs.SawyerHammerEnvV2, - "handle-press-side-v2": envs.SawyerHandlePressSideEnvV2, - "handle-press-v2": envs.SawyerHandlePressEnvV2, - "handle-pull-side-v2": envs.SawyerHandlePullSideEnvV2, - "handle-pull-v2": envs.SawyerHandlePullEnvV2, - "lever-pull-v2": envs.SawyerLeverPullEnvV2, - "peg-insert-side-v2": envs.SawyerPegInsertionSideEnvV2, - "pick-place-wall-v2": envs.SawyerPickPlaceWallEnvV2, - "pick-out-of-hole-v2": envs.SawyerPickOutOfHoleEnvV2, - "reach-v2": envs.SawyerReachEnvV2, - "push-back-v2": envs.SawyerPushBackEnvV2, - "push-v2": envs.SawyerPushEnvV2, - "pick-place-v2": envs.SawyerPickPlaceEnvV2, - "plate-slide-v2": envs.SawyerPlateSlideEnvV2, - "plate-slide-side-v2": envs.SawyerPlateSlideSideEnvV2, - "plate-slide-back-v2": envs.SawyerPlateSlideBackEnvV2, - "plate-slide-back-side-v2": envs.SawyerPlateSlideBackSideEnvV2, - "peg-unplug-side-v2": envs.SawyerPegUnplugSideEnvV2, - "soccer-v2": envs.SawyerSoccerEnvV2, - "stick-push-v2": envs.SawyerStickPushEnvV2, - "stick-pull-v2": envs.SawyerStickPullEnvV2, - "push-wall-v2": envs.SawyerPushWallEnvV2, - "reach-wall-v2": envs.SawyerReachWallEnvV2, - "shelf-place-v2": envs.SawyerShelfPlaceEnvV2, - "sweep-into-v2": envs.SawyerSweepIntoGoalEnvV2, - "sweep-v2": envs.SawyerSweepEnvV2, - "window-open-v2": envs.SawyerWindowOpenEnvV2, - "window-close-v2": envs.SawyerWindowCloseEnvV2, + "assembly-V3": envs.SawyerNutAssemblyEnvV3, + "basketball-V3": envs.SawyerBasketballEnvV3, + "bin-picking-V3": envs.SawyerBinPickingEnvV3, + "box-close-V3": envs.SawyerBoxCloseEnvV3, + "button-press-topdown-V3": envs.SawyerButtonPressTopdownEnvV3, + "button-press-topdown-wall-V3": envs.SawyerButtonPressTopdownWallEnvV3, + "button-press-V3": envs.SawyerButtonPressEnvV3, + "button-press-wall-V3": envs.SawyerButtonPressWallEnvV3, + "coffee-button-V3": envs.SawyerCoffeeButtonEnvV3, + "coffee-pull-V3": envs.SawyerCoffeePullEnvV3, + "coffee-push-V3": envs.SawyerCoffeePushEnvV3, + "dial-turn-V3": envs.SawyerDialTurnEnvV3, + "disassemble-V3": envs.SawyerNutDisassembleEnvV3, + "door-close-V3": envs.SawyerDoorCloseEnvV3, + "door-lock-V3": envs.SawyerDoorLockEnvV3, + "door-open-V3": envs.SawyerDoorEnvV3, + "door-unlock-V3": envs.SawyerDoorUnlockEnvV3, + "hand-insert-V3": envs.SawyerHandInsertEnvV3, + "drawer-close-V3": envs.SawyerDrawerCloseEnvV3, + "drawer-open-V3": envs.SawyerDrawerOpenEnvV3, + "faucet-open-V3": envs.SawyerFaucetOpenEnvV3, + "faucet-close-V3": envs.SawyerFaucetCloseEnvV3, + "hammer-V3": envs.SawyerHammerEnvV3, + "handle-press-side-V3": envs.SawyerHandlePressSideEnvV3, + "handle-press-V3": envs.SawyerHandlePressEnvV3, + "handle-pull-side-V3": envs.SawyerHandlePullSideEnvV3, + "handle-pull-V3": envs.SawyerHandlePullEnvV3, + "lever-pull-V3": envs.SawyerLeverPullEnvV3, + "peg-insert-side-V3": envs.SawyerPegInsertionSideEnvV3, + "pick-place-wall-V3": envs.SawyerPickPlaceWallEnvV3, + "pick-out-of-hole-V3": envs.SawyerPickOutOfHoleEnvV3, + "reach-V3": envs.SawyerReachEnvV3, + "push-back-V3": envs.SawyerPushBackEnvV3, + "push-V3": envs.SawyerPushEnvV3, + "pick-place-V3": envs.SawyerPickPlaceEnvV3, + "plate-slide-V3": envs.SawyerPlateSlideEnvV3, + "plate-slide-side-V3": envs.SawyerPlateSlideSideEnvV3, + "plate-slide-back-V3": envs.SawyerPlateSlideBackEnvV3, + "plate-slide-back-side-V3": envs.SawyerPlateSlideBackSideEnvV3, + "peg-unplug-side-V3": envs.SawyerPegUnplugSideEnvV3, + "soccer-V3": envs.SawyerSoccerEnvV3, + "stick-push-V3": envs.SawyerStickPushEnvV3, + "stick-pull-V3": envs.SawyerStickPullEnvV3, + "push-wall-V3": envs.SawyerPushWallEnvV3, + "reach-wall-V3": envs.SawyerReachWallEnvV3, + "shelf-place-V3": envs.SawyerShelfPlaceEnvV3, + "sweep-into-V3": envs.SawyerSweepIntoGoalEnvV3, + "sweep-V3": envs.SawyerSweepEnvV3, + "window-open-V3": envs.SawyerWindowOpenEnvV3, + "window-close-V3": envs.SawyerWindowCloseEnvV3, } @@ -210,178 +210,178 @@ def initialize(env, seed=None, render_mode=None): return OrderedDict(observable_goal_envs) -# V2 DICTS +# V3 DICTS -ALL_V2_ENVIRONMENTS = _get_env_dict( +ALL_V3_ENVIRONMENTS = _get_env_dict( [ - "assembly-v2", - "basketball-v2", - "bin-picking-v2", - "box-close-v2", - "button-press-topdown-v2", - "button-press-topdown-wall-v2", - "button-press-v2", - "button-press-wall-v2", - "coffee-button-v2", - "coffee-pull-v2", - "coffee-push-v2", - "dial-turn-v2", - "disassemble-v2", - "door-close-v2", - "door-lock-v2", - "door-open-v2", - "door-unlock-v2", - "hand-insert-v2", - "drawer-close-v2", - "drawer-open-v2", - "faucet-open-v2", - "faucet-close-v2", - "hammer-v2", - "handle-press-side-v2", - "handle-press-v2", - "handle-pull-side-v2", - "handle-pull-v2", - "lever-pull-v2", - "pick-place-wall-v2", - "pick-out-of-hole-v2", - "pick-place-v2", - "plate-slide-v2", - "plate-slide-side-v2", - "plate-slide-back-v2", - "plate-slide-back-side-v2", - "peg-insert-side-v2", - "peg-unplug-side-v2", - "soccer-v2", - "stick-push-v2", - "stick-pull-v2", - "push-v2", - "push-wall-v2", - "push-back-v2", - "reach-v2", - "reach-wall-v2", - "shelf-place-v2", - "sweep-into-v2", - "sweep-v2", - "window-open-v2", - "window-close-v2", + "assembly-V3", + "basketball-V3", + "bin-picking-V3", + "box-close-V3", + "button-press-topdown-V3", + "button-press-topdown-wall-V3", + "button-press-V3", + "button-press-wall-V3", + "coffee-button-V3", + "coffee-pull-V3", + "coffee-push-V3", + "dial-turn-V3", + "disassemble-V3", + "door-close-V3", + "door-lock-V3", + "door-open-V3", + "door-unlock-V3", + "hand-insert-V3", + "drawer-close-V3", + "drawer-open-V3", + "faucet-open-V3", + "faucet-close-V3", + "hammer-V3", + "handle-press-side-V3", + "handle-press-V3", + "handle-pull-side-V3", + "handle-pull-V3", + "lever-pull-V3", + "pick-place-wall-V3", + "pick-out-of-hole-V3", + "pick-place-V3", + "plate-slide-V3", + "plate-slide-side-V3", + "plate-slide-back-V3", + "plate-slide-back-side-V3", + "peg-insert-side-V3", + "peg-unplug-side-V3", + "soccer-V3", + "stick-push-V3", + "stick-pull-V3", + "push-V3", + "push-wall-V3", + "push-back-V3", + "reach-V3", + "reach-wall-V3", + "shelf-place-V3", + "sweep-into-V3", + "sweep-V3", + "window-open-V3", + "window-close-V3", ] ) -ALL_V2_ENVIRONMENTS_GOAL_HIDDEN = _create_hidden_goal_envs(ALL_V2_ENVIRONMENTS) -ALL_V2_ENVIRONMENTS_GOAL_OBSERVABLE = _create_observable_goal_envs(ALL_V2_ENVIRONMENTS) +ALL_V3_ENVIRONMENTS_GOAL_HIDDEN = _create_hidden_goal_envs(ALL_V3_ENVIRONMENTS) +ALL_V3_ENVIRONMENTS_GOAL_OBSERVABLE = _create_observable_goal_envs(ALL_V3_ENVIRONMENTS) # MT Dicts -MT10_V2 = _get_env_dict( +MT10_V3 = _get_env_dict( [ - "reach-v2", - "push-v2", - "pick-place-v2", - "door-open-v2", - "drawer-open-v2", - "drawer-close-v2", - "button-press-topdown-v2", - "peg-insert-side-v2", - "window-open-v2", - "window-close-v2", + "reach-V3", + "push-V3", + "pick-place-V3", + "door-open-V3", + "drawer-open-V3", + "drawer-close-V3", + "button-press-topdown-V3", + "peg-insert-side-V3", + "window-open-V3", + "window-close-V3", ] ) -MT10_V2_ARGS_KWARGS = _get_args_kwargs(ALL_V2_ENVIRONMENTS, MT10_V2) +MT10_V3_ARGS_KWARGS = _get_args_kwargs(ALL_V3_ENVIRONMENTS, MT10_V3) -MT50_V2 = ALL_V2_ENVIRONMENTS -MT50_V2_ARGS_KWARGS = _get_args_kwargs(ALL_V2_ENVIRONMENTS, MT50_V2) +MT50_V3 = ALL_V3_ENVIRONMENTS +MT50_V3_ARGS_KWARGS = _get_args_kwargs(ALL_V3_ENVIRONMENTS, MT50_V3) # ML Dicts -ML1_V2 = _get_train_test_env_dict( - list(ALL_V2_ENVIRONMENTS.keys()), list(ALL_V2_ENVIRONMENTS.keys()) +ML1_V3 = _get_train_test_env_dict( + list(ALL_V3_ENVIRONMENTS.keys()), list(ALL_V3_ENVIRONMENTS.keys()) ) -ML1_args_kwargs = _get_args_kwargs(ALL_V2_ENVIRONMENTS, ML1_V2["train"]) +ML1_args_kwargs = _get_args_kwargs(ALL_V3_ENVIRONMENTS, ML1_V3["train"]) -ML10_V2 = _get_train_test_env_dict( +ML10_V3 = _get_train_test_env_dict( train_env_names=[ - "reach-v2", - "push-v2", - "pick-place-v2", - "door-open-v2", - "drawer-close-v2", - "button-press-topdown-v2", - "peg-insert-side-v2", - "window-open-v2", - "sweep-v2", - "basketball-v2", + "reach-V3", + "push-V3", + "pick-place-V3", + "door-open-V3", + "drawer-close-V3", + "button-press-topdown-V3", + "peg-insert-side-V3", + "window-open-V3", + "sweep-V3", + "basketball-V3", ], test_env_names=[ - "drawer-open-v2", - "door-close-v2", - "shelf-place-v2", - "sweep-into-v2", - "lever-pull-v2", + "drawer-open-V3", + "door-close-V3", + "shelf-place-V3", + "sweep-into-V3", + "lever-pull-V3", ], ) ML10_ARGS_KWARGS = { - "train": _get_args_kwargs(ALL_V2_ENVIRONMENTS, ML10_V2["train"]), - "test": _get_args_kwargs(ALL_V2_ENVIRONMENTS, ML10_V2["test"]), + "train": _get_args_kwargs(ALL_V3_ENVIRONMENTS, ML10_V3["train"]), + "test": _get_args_kwargs(ALL_V3_ENVIRONMENTS, ML10_V3["test"]), } -ML45_V2 = _get_train_test_env_dict( +ML45_V3 = _get_train_test_env_dict( train_env_names=[ - "assembly-v2", - "basketball-v2", - "button-press-topdown-v2", - "button-press-topdown-wall-v2", - "button-press-v2", - "button-press-wall-v2", - "coffee-button-v2", - "coffee-pull-v2", - "coffee-push-v2", - "dial-turn-v2", - "disassemble-v2", - "door-close-v2", - "door-open-v2", - "drawer-close-v2", - "drawer-open-v2", - "faucet-open-v2", - "faucet-close-v2", - "hammer-v2", - "handle-press-side-v2", - "handle-press-v2", - "handle-pull-side-v2", - "handle-pull-v2", - "lever-pull-v2", - "pick-place-wall-v2", - "pick-out-of-hole-v2", - "push-back-v2", - "pick-place-v2", - "plate-slide-v2", - "plate-slide-side-v2", - "plate-slide-back-v2", - "plate-slide-back-side-v2", - "peg-insert-side-v2", - "peg-unplug-side-v2", - "soccer-v2", - "stick-push-v2", - "stick-pull-v2", - "push-wall-v2", - "push-v2", - "reach-wall-v2", - "reach-v2", - "shelf-place-v2", - "sweep-into-v2", - "sweep-v2", - "window-open-v2", - "window-close-v2", + "assembly-V3", + "basketball-V3", + "button-press-topdown-V3", + "button-press-topdown-wall-V3", + "button-press-V3", + "button-press-wall-V3", + "coffee-button-V3", + "coffee-pull-V3", + "coffee-push-V3", + "dial-turn-V3", + "disassemble-V3", + "door-close-V3", + "door-open-V3", + "drawer-close-V3", + "drawer-open-V3", + "faucet-open-V3", + "faucet-close-V3", + "hammer-V3", + "handle-press-side-V3", + "handle-press-V3", + "handle-pull-side-V3", + "handle-pull-V3", + "lever-pull-V3", + "pick-place-wall-V3", + "pick-out-of-hole-V3", + "push-back-V3", + "pick-place-V3", + "plate-slide-V3", + "plate-slide-side-V3", + "plate-slide-back-V3", + "plate-slide-back-side-V3", + "peg-insert-side-V3", + "peg-unplug-side-V3", + "soccer-V3", + "stick-push-V3", + "stick-pull-V3", + "push-wall-V3", + "push-V3", + "reach-wall-V3", + "reach-V3", + "shelf-place-V3", + "sweep-into-V3", + "sweep-V3", + "window-open-V3", + "window-close-V3", ], test_env_names=[ - "bin-picking-v2", - "box-close-v2", - "hand-insert-v2", - "door-lock-v2", - "door-unlock-v2", + "bin-picking-V3", + "box-close-V3", + "hand-insert-V3", + "door-lock-V3", + "door-unlock-V3", ], ) ML45_ARGS_KWARGS = { - "train": _get_args_kwargs(ALL_V2_ENVIRONMENTS, ML45_V2["train"]), - "test": _get_args_kwargs(ALL_V2_ENVIRONMENTS, ML45_V2["test"]), + "train": _get_args_kwargs(ALL_V3_ENVIRONMENTS, ML45_V3["train"]), + "test": _get_args_kwargs(ALL_V3_ENVIRONMENTS, ML45_V3["test"]), } diff --git a/metaworld/envs/__init__.py b/metaworld/envs/__init__.py index 4715834f1..848d96077 100644 --- a/metaworld/envs/__init__.py +++ b/metaworld/envs/__init__.py @@ -1,105 +1,105 @@ -from metaworld.envs.sawyer_assembly_peg_v2 import SawyerNutAssemblyEnvV2 -from metaworld.envs.sawyer_basketball_v2 import SawyerBasketballEnvV2 -from metaworld.envs.sawyer_bin_picking_v2 import SawyerBinPickingEnvV2 -from metaworld.envs.sawyer_box_close_v2 import SawyerBoxCloseEnvV2 -from metaworld.envs.sawyer_button_press_topdown_v2 import SawyerButtonPressTopdownEnvV2 -from metaworld.envs.sawyer_button_press_topdown_wall_v2 import ( - SawyerButtonPressTopdownWallEnvV2, +from metaworld.envs.sawyer_assembly_peg_v3 import SawyerNutAssemblyEnvV3 +from metaworld.envs.sawyer_basketball_v3 import SawyerBasketballEnvV3 +from metaworld.envs.sawyer_bin_picking_v3 import SawyerBinPickingEnvV3 +from metaworld.envs.sawyer_box_close_v3 import SawyerBoxCloseEnvV3 +from metaworld.envs.sawyer_button_press_topdown_v3 import SawyerButtonPressTopdownEnvV3 +from metaworld.envs.sawyer_button_press_topdown_wall_v3 import ( + SawyerButtonPressTopdownWallEnvV3, ) -from metaworld.envs.sawyer_button_press_v2 import SawyerButtonPressEnvV2 -from metaworld.envs.sawyer_button_press_wall_v2 import SawyerButtonPressWallEnvV2 -from metaworld.envs.sawyer_coffee_button_v2 import SawyerCoffeeButtonEnvV2 -from metaworld.envs.sawyer_coffee_pull_v2 import SawyerCoffeePullEnvV2 -from metaworld.envs.sawyer_coffee_push_v2 import SawyerCoffeePushEnvV2 -from metaworld.envs.sawyer_dial_turn_v2 import SawyerDialTurnEnvV2 -from metaworld.envs.sawyer_disassemble_peg_v2 import SawyerNutDisassembleEnvV2 -from metaworld.envs.sawyer_door_close_v2 import SawyerDoorCloseEnvV2 -from metaworld.envs.sawyer_door_lock_v2 import SawyerDoorLockEnvV2 -from metaworld.envs.sawyer_door_unlock_v2 import SawyerDoorUnlockEnvV2 -from metaworld.envs.sawyer_door_v2 import SawyerDoorEnvV2 -from metaworld.envs.sawyer_drawer_close_v2 import SawyerDrawerCloseEnvV2 -from metaworld.envs.sawyer_drawer_open_v2 import SawyerDrawerOpenEnvV2 -from metaworld.envs.sawyer_faucet_close_v2 import SawyerFaucetCloseEnvV2 -from metaworld.envs.sawyer_faucet_open_v2 import SawyerFaucetOpenEnvV2 -from metaworld.envs.sawyer_hammer_v2 import SawyerHammerEnvV2 -from metaworld.envs.sawyer_hand_insert_v2 import SawyerHandInsertEnvV2 -from metaworld.envs.sawyer_handle_press_side_v2 import SawyerHandlePressSideEnvV2 -from metaworld.envs.sawyer_handle_press_v2 import SawyerHandlePressEnvV2 -from metaworld.envs.sawyer_handle_pull_side_v2 import SawyerHandlePullSideEnvV2 -from metaworld.envs.sawyer_handle_pull_v2 import SawyerHandlePullEnvV2 -from metaworld.envs.sawyer_lever_pull_v2 import SawyerLeverPullEnvV2 -from metaworld.envs.sawyer_peg_insertion_side_v2 import SawyerPegInsertionSideEnvV2 -from metaworld.envs.sawyer_peg_unplug_side_v2 import SawyerPegUnplugSideEnvV2 -from metaworld.envs.sawyer_pick_out_of_hole_v2 import SawyerPickOutOfHoleEnvV2 -from metaworld.envs.sawyer_pick_place_v2 import SawyerPickPlaceEnvV2 -from metaworld.envs.sawyer_pick_place_wall_v2 import SawyerPickPlaceWallEnvV2 -from metaworld.envs.sawyer_plate_slide_back_side_v2 import SawyerPlateSlideBackSideEnvV2 -from metaworld.envs.sawyer_plate_slide_back_v2 import SawyerPlateSlideBackEnvV2 -from metaworld.envs.sawyer_plate_slide_side_v2 import SawyerPlateSlideSideEnvV2 -from metaworld.envs.sawyer_plate_slide_v2 import SawyerPlateSlideEnvV2 -from metaworld.envs.sawyer_push_back_v2 import SawyerPushBackEnvV2 -from metaworld.envs.sawyer_push_v2 import SawyerPushEnvV2 -from metaworld.envs.sawyer_push_wall_v2 import SawyerPushWallEnvV2 -from metaworld.envs.sawyer_reach_v2 import SawyerReachEnvV2 -from metaworld.envs.sawyer_reach_wall_v2 import SawyerReachWallEnvV2 -from metaworld.envs.sawyer_shelf_place_v2 import SawyerShelfPlaceEnvV2 -from metaworld.envs.sawyer_soccer_v2 import SawyerSoccerEnvV2 -from metaworld.envs.sawyer_stick_pull_v2 import SawyerStickPullEnvV2 -from metaworld.envs.sawyer_stick_push_v2 import SawyerStickPushEnvV2 -from metaworld.envs.sawyer_sweep_into_goal_v2 import SawyerSweepIntoGoalEnvV2 -from metaworld.envs.sawyer_sweep_v2 import SawyerSweepEnvV2 -from metaworld.envs.sawyer_window_close_v2 import SawyerWindowCloseEnvV2 -from metaworld.envs.sawyer_window_open_v2 import SawyerWindowOpenEnvV2 +from metaworld.envs.sawyer_button_press_v3 import SawyerButtonPressEnvV3 +from metaworld.envs.sawyer_button_press_wall_v3 import SawyerButtonPressWallEnvV3 +from metaworld.envs.sawyer_coffee_button_v3 import SawyerCoffeeButtonEnvV3 +from metaworld.envs.sawyer_coffee_pull_v3 import SawyerCoffeePullEnvV3 +from metaworld.envs.sawyer_coffee_push_v3 import SawyerCoffeePushEnvV3 +from metaworld.envs.sawyer_dial_turn_v3 import SawyerDialTurnEnvV3 +from metaworld.envs.sawyer_disassemble_peg_v3 import SawyerNutDisassembleEnvV3 +from metaworld.envs.sawyer_door_close_v3 import SawyerDoorCloseEnvV3 +from metaworld.envs.sawyer_door_lock_v3 import SawyerDoorLockEnvV3 +from metaworld.envs.sawyer_door_unlock_v3 import SawyerDoorUnlockEnvV3 +from metaworld.envs.sawyer_door_v3 import SawyerDoorEnvV3 +from metaworld.envs.sawyer_drawer_close_v3 import SawyerDrawerCloseEnvV3 +from metaworld.envs.sawyer_drawer_open_v3 import SawyerDrawerOpenEnvV3 +from metaworld.envs.sawyer_faucet_close_v3 import SawyerFaucetCloseEnvV3 +from metaworld.envs.sawyer_faucet_open_v3 import SawyerFaucetOpenEnvV3 +from metaworld.envs.sawyer_hammer_v3 import SawyerHammerEnvV3 +from metaworld.envs.sawyer_hand_insert_v3 import SawyerHandInsertEnvV3 +from metaworld.envs.sawyer_handle_press_side_v3 import SawyerHandlePressSideEnvV3 +from metaworld.envs.sawyer_handle_press_v3 import SawyerHandlePressEnvV3 +from metaworld.envs.sawyer_handle_pull_side_v3 import SawyerHandlePullSideEnvV3 +from metaworld.envs.sawyer_handle_pull_v3 import SawyerHandlePullEnvV3 +from metaworld.envs.sawyer_lever_pull_v3 import SawyerLeverPullEnvV3 +from metaworld.envs.sawyer_peg_insertion_side_v3 import SawyerPegInsertionSideEnvV3 +from metaworld.envs.sawyer_peg_unplug_side_v3 import SawyerPegUnplugSideEnvV3 +from metaworld.envs.sawyer_pick_out_of_hole_v3 import SawyerPickOutOfHoleEnvV3 +from metaworld.envs.sawyer_pick_place_v3 import SawyerPickPlaceEnvV3 +from metaworld.envs.sawyer_pick_place_wall_v3 import SawyerPickPlaceWallEnvV3 +from metaworld.envs.sawyer_plate_slide_back_side_v3 import SawyerPlateSlideBackSideEnvV3 +from metaworld.envs.sawyer_plate_slide_back_v3 import SawyerPlateSlideBackEnvV3 +from metaworld.envs.sawyer_plate_slide_side_v3 import SawyerPlateSlideSideEnvV3 +from metaworld.envs.sawyer_plate_slide_v3 import SawyerPlateSlideEnvV3 +from metaworld.envs.sawyer_push_back_v3 import SawyerPushBackEnvV3 +from metaworld.envs.sawyer_push_v3 import SawyerPushEnvV3 +from metaworld.envs.sawyer_push_wall_v3 import SawyerPushWallEnvV3 +from metaworld.envs.sawyer_reach_v3 import SawyerReachEnvV3 +from metaworld.envs.sawyer_reach_wall_v3 import SawyerReachWallEnvV3 +from metaworld.envs.sawyer_shelf_place_v3 import SawyerShelfPlaceEnvV3 +from metaworld.envs.sawyer_soccer_v3 import SawyerSoccerEnvV3 +from metaworld.envs.sawyer_stick_pull_v3 import SawyerStickPullEnvV3 +from metaworld.envs.sawyer_stick_push_v3 import SawyerStickPushEnvV3 +from metaworld.envs.sawyer_sweep_into_goal_v3 import SawyerSweepIntoGoalEnvV3 +from metaworld.envs.sawyer_sweep_v3 import SawyerSweepEnvV3 +from metaworld.envs.sawyer_window_close_v3 import SawyerWindowCloseEnvV3 +from metaworld.envs.sawyer_window_open_v3 import SawyerWindowOpenEnvV3 __all__ = [ - "SawyerNutAssemblyEnvV2", - "SawyerBasketballEnvV2", - "SawyerBinPickingEnvV2", - "SawyerBoxCloseEnvV2", - "SawyerButtonPressTopdownEnvV2", - "SawyerButtonPressTopdownWallEnvV2", - "SawyerButtonPressEnvV2", - "SawyerButtonPressWallEnvV2", - "SawyerCoffeeButtonEnvV2", - "SawyerCoffeePullEnvV2", - "SawyerCoffeePushEnvV2", - "SawyerDialTurnEnvV2", - "SawyerNutDisassembleEnvV2", - "SawyerDoorCloseEnvV2", - "SawyerDoorLockEnvV2", - "SawyerDoorUnlockEnvV2", - "SawyerDoorEnvV2", - "SawyerDrawerCloseEnvV2", - "SawyerDrawerOpenEnvV2", - "SawyerFaucetCloseEnvV2", - "SawyerFaucetOpenEnvV2", - "SawyerHammerEnvV2", - "SawyerHandInsertEnvV2", - "SawyerHandlePressSideEnvV2", - "SawyerHandlePressEnvV2", - "SawyerHandlePullSideEnvV2", - "SawyerHandlePullEnvV2", - "SawyerLeverPullEnvV2", - "SawyerPegInsertionSideEnvV2", - "SawyerPegUnplugSideEnvV2", - "SawyerPickOutOfHoleEnvV2", - "SawyerPickPlaceEnvV2", - "SawyerPickPlaceWallEnvV2", - "SawyerPlateSlideBackSideEnvV2", - "SawyerPlateSlideBackEnvV2", - "SawyerPlateSlideSideEnvV2", - "SawyerPlateSlideEnvV2", - "SawyerPushBackEnvV2", - "SawyerPushEnvV2", - "SawyerPushWallEnvV2", - "SawyerReachEnvV2", - "SawyerReachWallEnvV2", - "SawyerShelfPlaceEnvV2", - "SawyerSoccerEnvV2", - "SawyerStickPullEnvV2", - "SawyerStickPushEnvV2", - "SawyerSweepEnvV2", - "SawyerSweepIntoGoalEnvV2", - "SawyerWindowCloseEnvV2", - "SawyerWindowOpenEnvV2", + "SawyerNutAssemblyEnvV3", + "SawyerBasketballEnvV3", + "SawyerBinPickingEnvV3", + "SawyerBoxCloseEnvV3", + "SawyerButtonPressTopdownEnvV3", + "SawyerButtonPressTopdownWallEnvV3", + "SawyerButtonPressEnvV3", + "SawyerButtonPressWallEnvV3", + "SawyerCoffeeButtonEnvV3", + "SawyerCoffeePullEnvV3", + "SawyerCoffeePushEnvV3", + "SawyerDialTurnEnvV3", + "SawyerNutDisassembleEnvV3", + "SawyerDoorCloseEnvV3", + "SawyerDoorLockEnvV3", + "SawyerDoorUnlockEnvV3", + "SawyerDoorEnvV3", + "SawyerDrawerCloseEnvV3", + "SawyerDrawerOpenEnvV3", + "SawyerFaucetCloseEnvV3", + "SawyerFaucetOpenEnvV3", + "SawyerHammerEnvV3", + "SawyerHandInsertEnvV3", + "SawyerHandlePressSideEnvV3", + "SawyerHandlePressEnvV3", + "SawyerHandlePullSideEnvV3", + "SawyerHandlePullEnvV3", + "SawyerLeverPullEnvV3", + "SawyerPegInsertionSideEnvV3", + "SawyerPegUnplugSideEnvV3", + "SawyerPickOutOfHoleEnvV3", + "SawyerPickPlaceEnvV3", + "SawyerPickPlaceWallEnvV3", + "SawyerPlateSlideBackSideEnvV3", + "SawyerPlateSlideBackEnvV3", + "SawyerPlateSlideSideEnvV3", + "SawyerPlateSlideEnvV3", + "SawyerPushBackEnvV3", + "SawyerPushEnvV3", + "SawyerPushWallEnvV3", + "SawyerReachEnvV3", + "SawyerReachWallEnvV3", + "SawyerShelfPlaceEnvV3", + "SawyerSoccerEnvV3", + "SawyerStickPullEnvV3", + "SawyerStickPushEnvV3", + "SawyerSweepEnvV3", + "SawyerSweepIntoGoalEnvV3", + "SawyerWindowCloseEnvV3", + "SawyerWindowOpenEnvV3", ] diff --git a/metaworld/envs/sawyer_assembly_peg_v2.py b/metaworld/envs/sawyer_assembly_peg_v3.py similarity index 95% rename from metaworld/envs/sawyer_assembly_peg_v2.py rename to metaworld/envs/sawyer_assembly_peg_v3.py index adb0f5d68..050f5812d 100644 --- a/metaworld/envs/sawyer_assembly_peg_v2.py +++ b/metaworld/envs/sawyer_assembly_peg_v3.py @@ -6,13 +6,13 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict, ObservationDict from metaworld.utils.reward_utils import tolerance -class SawyerNutAssemblyEnvV2(SawyerXYZEnv): +class SawyerNutAssemblyEnvV3(SawyerXYZEnv): WRENCH_HANDLE_LENGTH: float = 0.02 def __init__( @@ -56,7 +56,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_assembly_peg.xml") + return full_V3_path_for("sawyer_xyz/sawyer_assembly_peg.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( @@ -178,11 +178,11 @@ def compute_reward( # This modified position's X value will perfect match the hand's X value # as long as it's within a certain threshold wrench_threshed = wrench.copy() - threshold = SawyerNutAssemblyEnvV2.WRENCH_HANDLE_LENGTH / 2.0 + threshold = SawyerNutAssemblyEnvV3.WRENCH_HANDLE_LENGTH / 2.0 if abs(wrench[0] - hand[0]) < threshold: wrench_threshed[0] = hand[0] - reward_quat = SawyerNutAssemblyEnvV2._reward_quat(obs) + reward_quat = SawyerNutAssemblyEnvV3._reward_quat(obs) reward_grab = self._gripper_caging_reward( actions, wrench_threshed, @@ -192,7 +192,7 @@ def compute_reward( xz_thresh=0.01, medium_density=True, ) - reward_in_place, success = SawyerNutAssemblyEnvV2._reward_pos( + reward_in_place, success = SawyerNutAssemblyEnvV3._reward_pos( wrench_center, self._target_pos ) diff --git a/metaworld/envs/sawyer_basketball_v2.py b/metaworld/envs/sawyer_basketball_v3.py similarity index 97% rename from metaworld/envs/sawyer_basketball_v2.py rename to metaworld/envs/sawyer_basketball_v3.py index 6df5a5d08..43502aed1 100644 --- a/metaworld/envs/sawyer_basketball_v2.py +++ b/metaworld/envs/sawyer_basketball_v3.py @@ -6,13 +6,13 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerBasketballEnvV2(SawyerXYZEnv): +class SawyerBasketballEnvV3(SawyerXYZEnv): PAD_SUCCESS_MARGIN: float = 0.06 TARGET_RADIUS: float = 0.08 @@ -60,7 +60,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_basketball.xml") + return full_V3_path_for("sawyer_xyz/sawyer_basketball.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_bin_picking_v2.py b/metaworld/envs/sawyer_bin_picking_v3.py similarity index 96% rename from metaworld/envs/sawyer_bin_picking_v2.py rename to metaworld/envs/sawyer_bin_picking_v3.py index b9688578e..495b1a31a 100644 --- a/metaworld/envs/sawyer_bin_picking_v2.py +++ b/metaworld/envs/sawyer_bin_picking_v3.py @@ -6,21 +6,21 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerBinPickingEnvV2(SawyerXYZEnv): +class SawyerBinPickingEnvV3(SawyerXYZEnv): """SawyerBinPickingEnv. - Motivation for V2: + Motivation for V3: V1 was often unsolvable because the cube could be located outside of the starting bin. It could even be near the base of the Sawyer and out - of reach of the gripper. V2 changes the `obj_low` and `obj_high` bounds + of reach of the gripper. V3 changes the `obj_low` and `obj_high` bounds to fix this. - Changelog from V1 to V2: + Changelog from V1 to V3: - (7/20/20) Changed object initialization space - (7/24/20) Added Byron's XML changes - (11/23/20) Updated reward function to new pick-place style @@ -80,7 +80,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_bin_picking.xml") + return full_V3_path_for("sawyer_xyz/sawyer_bin_picking.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_box_close_v2.py b/metaworld/envs/sawyer_box_close_v3.py similarity index 95% rename from metaworld/envs/sawyer_box_close_v2.py rename to metaworld/envs/sawyer_box_close_v3.py index f471b6496..f666671bf 100644 --- a/metaworld/envs/sawyer_box_close_v2.py +++ b/metaworld/envs/sawyer_box_close_v3.py @@ -7,13 +7,13 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerBoxCloseEnvV2(SawyerXYZEnv): +class SawyerBoxCloseEnvV3(SawyerXYZEnv): def __init__( self, render_mode: RenderMode | None = None, @@ -58,7 +58,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_box.xml") + return full_V3_path_for("sawyer_xyz/sawyer_box.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( @@ -188,9 +188,9 @@ def compute_reward( self._target_pos is not None ), "`reset_model()` must be called before `compute_reward()`." - reward_grab = SawyerBoxCloseEnvV2._reward_grab_effort(actions) - reward_quat = SawyerBoxCloseEnvV2._reward_quat(obs) - reward_steps = SawyerBoxCloseEnvV2._reward_pos(obs, self._target_pos) + reward_grab = SawyerBoxCloseEnvV3._reward_grab_effort(actions) + reward_quat = SawyerBoxCloseEnvV3._reward_quat(obs) + reward_steps = SawyerBoxCloseEnvV3._reward_pos(obs, self._target_pos) reward = sum( ( diff --git a/metaworld/envs/sawyer_button_press_topdown_v2.py b/metaworld/envs/sawyer_button_press_topdown_v3.py similarity index 96% rename from metaworld/envs/sawyer_button_press_topdown_v2.py rename to metaworld/envs/sawyer_button_press_topdown_v3.py index 048d1494c..7effd070f 100644 --- a/metaworld/envs/sawyer_button_press_topdown_v2.py +++ b/metaworld/envs/sawyer_button_press_topdown_v3.py @@ -7,13 +7,13 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerButtonPressTopdownEnvV2(SawyerXYZEnv): +class SawyerButtonPressTopdownEnvV3(SawyerXYZEnv): def __init__( self, render_mode: RenderMode | None = None, @@ -50,7 +50,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_button_press_topdown.xml") + return full_V3_path_for("sawyer_xyz/sawyer_button_press_topdown.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_button_press_topdown_wall_v2.py b/metaworld/envs/sawyer_button_press_topdown_wall_v3.py similarity index 96% rename from metaworld/envs/sawyer_button_press_topdown_wall_v2.py rename to metaworld/envs/sawyer_button_press_topdown_wall_v3.py index fe1e085d7..6a12ff81f 100644 --- a/metaworld/envs/sawyer_button_press_topdown_wall_v2.py +++ b/metaworld/envs/sawyer_button_press_topdown_wall_v3.py @@ -7,13 +7,13 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerButtonPressTopdownWallEnvV2(SawyerXYZEnv): +class SawyerButtonPressTopdownWallEnvV3(SawyerXYZEnv): def __init__( self, render_mode: RenderMode | None = None, @@ -51,7 +51,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_button_press_topdown_wall.xml") + return full_V3_path_for("sawyer_xyz/sawyer_button_press_topdown_wall.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_button_press_v2.py b/metaworld/envs/sawyer_button_press_v3.py similarity index 96% rename from metaworld/envs/sawyer_button_press_v2.py rename to metaworld/envs/sawyer_button_press_v3.py index 72004c175..31c095cc0 100644 --- a/metaworld/envs/sawyer_button_press_v2.py +++ b/metaworld/envs/sawyer_button_press_v3.py @@ -6,13 +6,13 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerButtonPressEnvV2(SawyerXYZEnv): +class SawyerButtonPressEnvV3(SawyerXYZEnv): def __init__( self, render_mode: RenderMode | None = None, @@ -49,7 +49,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_button_press.xml") + return full_V3_path_for("sawyer_xyz/sawyer_button_press.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_button_press_wall_v2.py b/metaworld/envs/sawyer_button_press_wall_v3.py similarity index 96% rename from metaworld/envs/sawyer_button_press_wall_v2.py rename to metaworld/envs/sawyer_button_press_wall_v3.py index 44b3f1007..6ae0c9785 100644 --- a/metaworld/envs/sawyer_button_press_wall_v2.py +++ b/metaworld/envs/sawyer_button_press_wall_v3.py @@ -6,13 +6,13 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerButtonPressWallEnvV2(SawyerXYZEnv): +class SawyerButtonPressWallEnvV3(SawyerXYZEnv): def __init__( self, render_mode: RenderMode | None = None, @@ -51,7 +51,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_button_press_wall.xml") + return full_V3_path_for("sawyer_xyz/sawyer_button_press_wall.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_coffee_button_v2.py b/metaworld/envs/sawyer_coffee_button_v3.py similarity index 96% rename from metaworld/envs/sawyer_coffee_button_v2.py rename to metaworld/envs/sawyer_coffee_button_v3.py index d3537aa44..c514d6d62 100644 --- a/metaworld/envs/sawyer_coffee_button_v2.py +++ b/metaworld/envs/sawyer_coffee_button_v3.py @@ -6,13 +6,13 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerCoffeeButtonEnvV2(SawyerXYZEnv): +class SawyerCoffeeButtonEnvV3(SawyerXYZEnv): def __init__( self, render_mode: RenderMode | None = None, @@ -55,7 +55,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_coffee.xml") + return full_V3_path_for("sawyer_xyz/sawyer_coffee.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_coffee_pull_v2.py b/metaworld/envs/sawyer_coffee_pull_v3.py similarity index 97% rename from metaworld/envs/sawyer_coffee_pull_v2.py rename to metaworld/envs/sawyer_coffee_pull_v3.py index 16936c0a6..fed6a5735 100644 --- a/metaworld/envs/sawyer_coffee_pull_v2.py +++ b/metaworld/envs/sawyer_coffee_pull_v3.py @@ -7,13 +7,13 @@ from gymnasium.spaces import Box from scipy.spatial.transform import Rotation -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerCoffeePullEnvV2(SawyerXYZEnv): +class SawyerCoffeePullEnvV3(SawyerXYZEnv): def __init__( self, render_mode: RenderMode | None = None, @@ -54,7 +54,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_coffee.xml") + return full_V3_path_for("sawyer_xyz/sawyer_coffee.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_coffee_push_v2.py b/metaworld/envs/sawyer_coffee_push_v3.py similarity index 97% rename from metaworld/envs/sawyer_coffee_push_v2.py rename to metaworld/envs/sawyer_coffee_push_v3.py index 14554ade4..06ca8c58c 100644 --- a/metaworld/envs/sawyer_coffee_push_v2.py +++ b/metaworld/envs/sawyer_coffee_push_v3.py @@ -7,13 +7,13 @@ from gymnasium.spaces import Box from scipy.spatial.transform import Rotation -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerCoffeePushEnvV2(SawyerXYZEnv): +class SawyerCoffeePushEnvV3(SawyerXYZEnv): def __init__( self, render_mode: RenderMode | None = None, @@ -54,7 +54,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_coffee.xml") + return full_V3_path_for("sawyer_xyz/sawyer_coffee.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_dial_turn_v2.py b/metaworld/envs/sawyer_dial_turn_v3.py similarity index 97% rename from metaworld/envs/sawyer_dial_turn_v2.py rename to metaworld/envs/sawyer_dial_turn_v3.py index e17d8eb2e..c26d05a6a 100644 --- a/metaworld/envs/sawyer_dial_turn_v2.py +++ b/metaworld/envs/sawyer_dial_turn_v3.py @@ -7,13 +7,13 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerDialTurnEnvV2(SawyerXYZEnv): +class SawyerDialTurnEnvV3(SawyerXYZEnv): TARGET_RADIUS: float = 0.07 def __init__( @@ -52,7 +52,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_dial.xml") + return full_V3_path_for("sawyer_xyz/sawyer_dial.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_disassemble_peg_v2.py b/metaworld/envs/sawyer_disassemble_peg_v3.py similarity index 94% rename from metaworld/envs/sawyer_disassemble_peg_v2.py rename to metaworld/envs/sawyer_disassemble_peg_v3.py index f4870fea5..e36534529 100644 --- a/metaworld/envs/sawyer_disassemble_peg_v2.py +++ b/metaworld/envs/sawyer_disassemble_peg_v3.py @@ -7,13 +7,13 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerNutDisassembleEnvV2(SawyerXYZEnv): +class SawyerNutDisassembleEnvV3(SawyerXYZEnv): WRENCH_HANDLE_LENGTH: float = 0.02 def __init__( @@ -60,7 +60,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_assembly_peg.xml") + return full_V3_path_for("sawyer_xyz/sawyer_assembly_peg.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( @@ -170,11 +170,11 @@ def compute_reward( # This modified position's X value will perfect match the hand's X value # as long as it's within a certain threshold wrench_threshed = wrench.copy() - threshold = SawyerNutDisassembleEnvV2.WRENCH_HANDLE_LENGTH / 2.0 + threshold = SawyerNutDisassembleEnvV3.WRENCH_HANDLE_LENGTH / 2.0 if abs(wrench[0] - hand[0]) < threshold: wrench_threshed[0] = hand[0] - reward_quat = SawyerNutDisassembleEnvV2._reward_quat(obs) + reward_quat = SawyerNutDisassembleEnvV3._reward_quat(obs) reward_grab = self._gripper_caging_reward( actions, wrench_threshed, @@ -184,7 +184,7 @@ def compute_reward( xz_thresh=0.01, high_density=True, ) - reward_in_place = SawyerNutDisassembleEnvV2._reward_pos( + reward_in_place = SawyerNutDisassembleEnvV3._reward_pos( wrench_center, self._target_pos ) diff --git a/metaworld/envs/sawyer_door_close_v2.py b/metaworld/envs/sawyer_door_close_v3.py similarity index 96% rename from metaworld/envs/sawyer_door_close_v2.py rename to metaworld/envs/sawyer_door_close_v3.py index cdc17d61c..278407649 100644 --- a/metaworld/envs/sawyer_door_close_v2.py +++ b/metaworld/envs/sawyer_door_close_v3.py @@ -7,13 +7,13 @@ from gymnasium.spaces import Box from scipy.spatial.transform import Rotation -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerDoorCloseEnvV2(SawyerXYZEnv): +class SawyerDoorCloseEnvV3(SawyerXYZEnv): def __init__( self, render_mode: RenderMode | None = None, @@ -56,7 +56,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_door_pull.xml") + return full_V3_path_for("sawyer_xyz/sawyer_door_pull.xml") def _get_pos_objects(self) -> npt.NDArray[Any]: return self.data.geom("handle").xpos.copy() diff --git a/metaworld/envs/sawyer_door_lock_v2.py b/metaworld/envs/sawyer_door_lock_v3.py similarity index 96% rename from metaworld/envs/sawyer_door_lock_v2.py rename to metaworld/envs/sawyer_door_lock_v3.py index 3a889201d..353b992a6 100644 --- a/metaworld/envs/sawyer_door_lock_v2.py +++ b/metaworld/envs/sawyer_door_lock_v3.py @@ -7,13 +7,13 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerDoorLockEnvV2(SawyerXYZEnv): +class SawyerDoorLockEnvV3(SawyerXYZEnv): def __init__( self, render_mode: RenderMode | None = None, @@ -53,7 +53,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_door_lock.xml") + return full_V3_path_for("sawyer_xyz/sawyer_door_lock.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_door_unlock_v2.py b/metaworld/envs/sawyer_door_unlock_v3.py similarity index 96% rename from metaworld/envs/sawyer_door_unlock_v2.py rename to metaworld/envs/sawyer_door_unlock_v3.py index 1239d7e4c..27d4fb329 100644 --- a/metaworld/envs/sawyer_door_unlock_v2.py +++ b/metaworld/envs/sawyer_door_unlock_v3.py @@ -6,13 +6,13 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerDoorUnlockEnvV2(SawyerXYZEnv): +class SawyerDoorUnlockEnvV3(SawyerXYZEnv): def __init__( self, render_mode: RenderMode | None = None, @@ -51,7 +51,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_door_lock.xml") + return full_V3_path_for("sawyer_xyz/sawyer_door_lock.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_door_v2.py b/metaworld/envs/sawyer_door_v3.py similarity index 95% rename from metaworld/envs/sawyer_door_v2.py rename to metaworld/envs/sawyer_door_v3.py index 91960d589..27da3c8b5 100644 --- a/metaworld/envs/sawyer_door_v2.py +++ b/metaworld/envs/sawyer_door_v3.py @@ -7,13 +7,13 @@ from gymnasium.spaces import Box from scipy.spatial.transform import Rotation -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerDoorEnvV2(SawyerXYZEnv): +class SawyerDoorEnvV3(SawyerXYZEnv): def __init__( self, render_mode: RenderMode | None = None, @@ -56,7 +56,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_door_pull.xml") + return full_V3_path_for("sawyer_xyz/sawyer_door_pull.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( @@ -179,8 +179,8 @@ def compute_reward( ), "`reset_model()` must be called before `compute_reward()`." theta = float(self.data.joint("doorjoint").qpos.item()) - reward_grab = SawyerDoorEnvV2._reward_grab_effort(actions) - reward_steps = SawyerDoorEnvV2._reward_pos(obs, theta) + reward_grab = SawyerDoorEnvV3._reward_grab_effort(actions) + reward_steps = SawyerDoorEnvV3._reward_pos(obs, theta) reward = sum( ( diff --git a/metaworld/envs/sawyer_drawer_close_v2.py b/metaworld/envs/sawyer_drawer_close_v3.py similarity index 96% rename from metaworld/envs/sawyer_drawer_close_v2.py rename to metaworld/envs/sawyer_drawer_close_v3.py index 73902b503..abd203a06 100644 --- a/metaworld/envs/sawyer_drawer_close_v2.py +++ b/metaworld/envs/sawyer_drawer_close_v3.py @@ -6,13 +6,13 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerDrawerCloseEnvV2(SawyerXYZEnv): +class SawyerDrawerCloseEnvV3(SawyerXYZEnv): _TARGET_RADIUS: float = 0.04 def __init__( @@ -56,7 +56,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_drawer.xml") + return full_V3_path_for("sawyer_xyz/sawyer_drawer.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_drawer_open_v2.py b/metaworld/envs/sawyer_drawer_open_v3.py similarity index 96% rename from metaworld/envs/sawyer_drawer_open_v2.py rename to metaworld/envs/sawyer_drawer_open_v3.py index 9caeb10af..f10165fda 100644 --- a/metaworld/envs/sawyer_drawer_open_v2.py +++ b/metaworld/envs/sawyer_drawer_open_v3.py @@ -6,13 +6,13 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerDrawerOpenEnvV2(SawyerXYZEnv): +class SawyerDrawerOpenEnvV3(SawyerXYZEnv): def __init__( self, render_mode: RenderMode | None = None, @@ -54,7 +54,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_drawer.xml") + return full_V3_path_for("sawyer_xyz/sawyer_drawer.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_faucet_close_v2.py b/metaworld/envs/sawyer_faucet_close_v3.py similarity index 96% rename from metaworld/envs/sawyer_faucet_close_v2.py rename to metaworld/envs/sawyer_faucet_close_v3.py index 0aca507d9..94e1cbc0e 100644 --- a/metaworld/envs/sawyer_faucet_close_v2.py +++ b/metaworld/envs/sawyer_faucet_close_v3.py @@ -7,13 +7,13 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerFaucetCloseEnvV2(SawyerXYZEnv): +class SawyerFaucetCloseEnvV3(SawyerXYZEnv): def __init__( self, render_mode: RenderMode | None = None, @@ -52,7 +52,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_faucet.xml") + return full_V3_path_for("sawyer_xyz/sawyer_faucet.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_faucet_open_v2.py b/metaworld/envs/sawyer_faucet_open_v3.py similarity index 96% rename from metaworld/envs/sawyer_faucet_open_v2.py rename to metaworld/envs/sawyer_faucet_open_v3.py index 4364c1573..e1bdc8277 100644 --- a/metaworld/envs/sawyer_faucet_open_v2.py +++ b/metaworld/envs/sawyer_faucet_open_v3.py @@ -6,13 +6,13 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerFaucetOpenEnvV2(SawyerXYZEnv): +class SawyerFaucetOpenEnvV3(SawyerXYZEnv): def __init__( self, render_mode: RenderMode | None = None, @@ -51,7 +51,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_faucet.xml") + return full_V3_path_for("sawyer_xyz/sawyer_faucet.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_hammer_v2.py b/metaworld/envs/sawyer_hammer_v3.py similarity index 94% rename from metaworld/envs/sawyer_hammer_v2.py rename to metaworld/envs/sawyer_hammer_v3.py index 46cade09e..9c92173dc 100644 --- a/metaworld/envs/sawyer_hammer_v2.py +++ b/metaworld/envs/sawyer_hammer_v3.py @@ -6,13 +6,13 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import HammerInitConfigDict from metaworld.utils import reward_utils -class SawyerHammerEnvV2(SawyerXYZEnv): +class SawyerHammerEnvV3(SawyerXYZEnv): HAMMER_HANDLE_LENGTH = 0.14 def __init__( @@ -53,7 +53,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_hammer.xml") + return full_V3_path_for("sawyer_xyz/sawyer_hammer.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( @@ -151,11 +151,11 @@ def compute_reward( # This modified position's X value will perfect match the hand's X value # as long as it's within a certain threshold hammer_threshed = hammer.copy() - threshold = SawyerHammerEnvV2.HAMMER_HANDLE_LENGTH / 2.0 + threshold = SawyerHammerEnvV3.HAMMER_HANDLE_LENGTH / 2.0 if abs(hammer[0] - hand[0]) < threshold: hammer_threshed[0] = hand[0] - reward_quat = SawyerHammerEnvV2._reward_quat(obs) + reward_quat = SawyerHammerEnvV3._reward_quat(obs) reward_grab = self._gripper_caging_reward( actions, hammer_threshed, @@ -165,7 +165,7 @@ def compute_reward( xz_thresh=0.01, high_density=True, ) - reward_in_place = SawyerHammerEnvV2._reward_pos(hammer_head, self._target_pos) + reward_in_place = SawyerHammerEnvV3._reward_pos(hammer_head, self._target_pos) reward = (2.0 * reward_grab + 6.0 * reward_in_place) * reward_quat # Override reward on success. We check that reward is above a threshold diff --git a/metaworld/envs/sawyer_hand_insert_v2.py b/metaworld/envs/sawyer_hand_insert_v3.py similarity index 96% rename from metaworld/envs/sawyer_hand_insert_v2.py rename to metaworld/envs/sawyer_hand_insert_v3.py index cef626ed8..c135e0709 100644 --- a/metaworld/envs/sawyer_hand_insert_v2.py +++ b/metaworld/envs/sawyer_hand_insert_v3.py @@ -6,13 +6,13 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerHandInsertEnvV2(SawyerXYZEnv): +class SawyerHandInsertEnvV3(SawyerXYZEnv): TARGET_RADIUS: float = 0.05 def __init__( @@ -55,7 +55,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_table_with_hole.xml") + return full_V3_path_for("sawyer_xyz/sawyer_table_with_hole.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_handle_press_side_v2.py b/metaworld/envs/sawyer_handle_press_side_v3.py similarity index 96% rename from metaworld/envs/sawyer_handle_press_side_v2.py rename to metaworld/envs/sawyer_handle_press_side_v3.py index ad82dd054..00bc52bbe 100644 --- a/metaworld/envs/sawyer_handle_press_side_v2.py +++ b/metaworld/envs/sawyer_handle_press_side_v3.py @@ -6,22 +6,22 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerHandlePressSideEnvV2(SawyerXYZEnv): +class SawyerHandlePressSideEnvV3(SawyerXYZEnv): """SawyerHandlePressSideEnv. - Motivation for V2: + Motivation for V3: V1 was very difficult to solve because the end effector's wrist has a nub that got caught on the box before pushing the handle all the way down. There are a number of ways to fix this, e.g. moving box to right side of table, extending handle's length, decreasing handle's damping, or moving the goal position slightly upward. I just the last one. - Changelog from V1 to V2: + Changelog from V1 to V3: - (8/05/20) Updated to new XML - (6/30/20) Increased goal's Z coordinate by 0.01 in XML """ @@ -67,7 +67,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_handle_press_sideways.xml") + return full_V3_path_for("sawyer_xyz/sawyer_handle_press_sideways.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_handle_press_v2.py b/metaworld/envs/sawyer_handle_press_v3.py similarity index 96% rename from metaworld/envs/sawyer_handle_press_v2.py rename to metaworld/envs/sawyer_handle_press_v3.py index bba2b5a72..593c8c646 100644 --- a/metaworld/envs/sawyer_handle_press_v2.py +++ b/metaworld/envs/sawyer_handle_press_v3.py @@ -6,13 +6,13 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerHandlePressEnvV2(SawyerXYZEnv): +class SawyerHandlePressEnvV3(SawyerXYZEnv): TARGET_RADIUS: float = 0.02 def __init__( @@ -53,7 +53,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_handle_press.xml") + return full_V3_path_for("sawyer_xyz/sawyer_handle_press.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_handle_pull_side_v2.py b/metaworld/envs/sawyer_handle_pull_side_v3.py similarity index 96% rename from metaworld/envs/sawyer_handle_pull_side_v2.py rename to metaworld/envs/sawyer_handle_pull_side_v3.py index 036b0e306..c1e636da9 100644 --- a/metaworld/envs/sawyer_handle_pull_side_v2.py +++ b/metaworld/envs/sawyer_handle_pull_side_v3.py @@ -6,13 +6,13 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerHandlePullSideEnvV2(SawyerXYZEnv): +class SawyerHandlePullSideEnvV3(SawyerXYZEnv): def __init__( self, render_mode: RenderMode | None = None, @@ -52,7 +52,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_handle_press_sideways.xml") + return full_V3_path_for("sawyer_xyz/sawyer_handle_press_sideways.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_handle_pull_v2.py b/metaworld/envs/sawyer_handle_pull_v3.py similarity index 96% rename from metaworld/envs/sawyer_handle_pull_v2.py rename to metaworld/envs/sawyer_handle_pull_v3.py index 834bc50e2..f841f65c0 100644 --- a/metaworld/envs/sawyer_handle_pull_v2.py +++ b/metaworld/envs/sawyer_handle_pull_v3.py @@ -6,13 +6,13 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerHandlePullEnvV2(SawyerXYZEnv): +class SawyerHandlePullEnvV3(SawyerXYZEnv): def __init__( self, render_mode: RenderMode | None = None, @@ -51,7 +51,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_handle_press.xml") + return full_V3_path_for("sawyer_xyz/sawyer_handle_press.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_lever_pull_v2.py b/metaworld/envs/sawyer_lever_pull_v3.py similarity index 96% rename from metaworld/envs/sawyer_lever_pull_v2.py rename to metaworld/envs/sawyer_lever_pull_v3.py index 2d9316508..fa8e8748f 100644 --- a/metaworld/envs/sawyer_lever_pull_v2.py +++ b/metaworld/envs/sawyer_lever_pull_v3.py @@ -8,19 +8,19 @@ from gymnasium.spaces import Box from scipy.spatial.transform import Rotation -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerLeverPullEnvV2(SawyerXYZEnv): +class SawyerLeverPullEnvV3(SawyerXYZEnv): """SawyerLeverPullEnv. - Motivation for V2: + Motivation for V3: V1 was impossible to solve because the lever would have to be pulled through the table in order to reach the target location. - Changelog from V1 to V2: + Changelog from V1 to V3: - (8/12/20) Updated to Byron's XML - (7/7/20) Added 3 element lever position to the observation (for consistency with other environments) @@ -68,7 +68,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_lever_pull.xml") + return full_V3_path_for("sawyer_xyz/sawyer_lever_pull.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_peg_insertion_side_v2.py b/metaworld/envs/sawyer_peg_insertion_side_v3.py similarity index 97% rename from metaworld/envs/sawyer_peg_insertion_side_v2.py rename to metaworld/envs/sawyer_peg_insertion_side_v3.py index e02f0ccbe..e23ae1859 100644 --- a/metaworld/envs/sawyer_peg_insertion_side_v2.py +++ b/metaworld/envs/sawyer_peg_insertion_side_v3.py @@ -7,21 +7,21 @@ from gymnasium.spaces import Box from scipy.spatial.transform import Rotation -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerPegInsertionSideEnvV2(SawyerXYZEnv): +class SawyerPegInsertionSideEnvV3(SawyerXYZEnv): TARGET_RADIUS: float = 0.07 """ - Motivation for V2: + Motivation for V3: V1 was difficult to solve because the observation didn't say where to insert the peg (the hole's location). Furthermore, the hole object could be initialized in such a way that it severely restrained the sawyer's movement. - Changelog from V1 to V2: + Changelog from V1 to V3: - (8/21/20) Updated to Byron's XML - (7/7/20) Removed 1 element vector. Replaced with 3 element position of the hole (for consistency with other environments) @@ -80,7 +80,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_peg_insertion_side.xml") + return full_V3_path_for("sawyer_xyz/sawyer_peg_insertion_side.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_peg_unplug_side_v2.py b/metaworld/envs/sawyer_peg_unplug_side_v3.py similarity index 96% rename from metaworld/envs/sawyer_peg_unplug_side_v2.py rename to metaworld/envs/sawyer_peg_unplug_side_v3.py index 983db96d4..90f98bed2 100644 --- a/metaworld/envs/sawyer_peg_unplug_side_v2.py +++ b/metaworld/envs/sawyer_peg_unplug_side_v3.py @@ -6,13 +6,13 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerPegUnplugSideEnvV2(SawyerXYZEnv): +class SawyerPegUnplugSideEnvV3(SawyerXYZEnv): def __init__( self, render_mode: RenderMode | None = None, @@ -49,7 +49,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_peg_unplug_side.xml") + return full_V3_path_for("sawyer_xyz/sawyer_peg_unplug_side.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_pick_out_of_hole_v2.py b/metaworld/envs/sawyer_pick_out_of_hole_v3.py similarity index 97% rename from metaworld/envs/sawyer_pick_out_of_hole_v2.py rename to metaworld/envs/sawyer_pick_out_of_hole_v3.py index 7b64596a4..d135de91d 100644 --- a/metaworld/envs/sawyer_pick_out_of_hole_v2.py +++ b/metaworld/envs/sawyer_pick_out_of_hole_v3.py @@ -6,13 +6,13 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerPickOutOfHoleEnvV2(SawyerXYZEnv): +class SawyerPickOutOfHoleEnvV3(SawyerXYZEnv): _TARGET_RADIUS: float = 0.02 def __init__( @@ -55,7 +55,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_pick_out_of_hole.xml") + return full_V3_path_for("sawyer_xyz/sawyer_pick_out_of_hole.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_pick_place_v2.py b/metaworld/envs/sawyer_pick_place_v3.py similarity index 97% rename from metaworld/envs/sawyer_pick_place_v2.py rename to metaworld/envs/sawyer_pick_place_v3.py index 596448681..9b8dae89d 100644 --- a/metaworld/envs/sawyer_pick_place_v2.py +++ b/metaworld/envs/sawyer_pick_place_v3.py @@ -7,19 +7,19 @@ from gymnasium.spaces import Box from scipy.spatial.transform import Rotation -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerPickPlaceEnvV2(SawyerXYZEnv): +class SawyerPickPlaceEnvV3(SawyerXYZEnv): """SawyerPickPlaceEnv. - Motivation for V2: + Motivation for V3: V1 was very difficult to solve because the observation didn't say where to move after picking up the puck. - Changelog from V1 to V2: + Changelog from V1 to V3: - (7/7/20) Removed 3 element vector. Replaced with 3 element position of the goal (for consistency with other environments) - (6/15/20) Added a 3 element vector to the observation. This vector @@ -73,7 +73,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_pick_place_v2.xml") + return full_V3_path_for("sawyer_xyz/sawyer_pick_place_V3.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_pick_place_wall_v2.py b/metaworld/envs/sawyer_pick_place_wall_v3.py similarity index 96% rename from metaworld/envs/sawyer_pick_place_wall_v2.py rename to metaworld/envs/sawyer_pick_place_wall_v3.py index cd6af8461..748680e67 100644 --- a/metaworld/envs/sawyer_pick_place_wall_v2.py +++ b/metaworld/envs/sawyer_pick_place_wall_v3.py @@ -7,19 +7,19 @@ from gymnasium.spaces import Box from scipy.spatial.transform import Rotation -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerPickPlaceWallEnvV2(SawyerXYZEnv): +class SawyerPickPlaceWallEnvV3(SawyerXYZEnv): """SawyerPickPlaceWallEnv. - Motivation for V2: + Motivation for V3: V1 was difficult to solve because the observation didn't say where to move after picking up the puck. - Changelog from V1 to V2: + Changelog from V1 to V3: - (7/7/20) Removed 3 element vector. Replaced with 3 element position of the goal (for consistency with other environments) - (6/24/20) Added a 3 element vector to the observation. This vector @@ -73,7 +73,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_pick_place_wall_v2.xml") + return full_V3_path_for("sawyer_xyz/sawyer_pick_place_wall_V3.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_plate_slide_back_side_v2.py b/metaworld/envs/sawyer_plate_slide_back_side_v3.py similarity index 96% rename from metaworld/envs/sawyer_plate_slide_back_side_v2.py rename to metaworld/envs/sawyer_plate_slide_back_side_v3.py index 5957199eb..017a1879a 100644 --- a/metaworld/envs/sawyer_plate_slide_back_side_v2.py +++ b/metaworld/envs/sawyer_plate_slide_back_side_v3.py @@ -7,22 +7,22 @@ from gymnasium.spaces import Box from scipy.spatial.transform import Rotation -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerPlateSlideBackSideEnvV2(SawyerXYZEnv): +class SawyerPlateSlideBackSideEnvV3(SawyerXYZEnv): """SawyerPlateSlideBackSideEnv. - Motivation for V2: + Motivation for V3: In V1, the cabinet was lifted .02 units off the ground. In order for the end effector to move the plate without running into the cabinet, its movements had to be very precise. These precise movements become very difficult as soon as noise is introduced to the action space (success rate dropped from 100% to 20%). - Changelog from V1 to V2: + Changelog from V1 to V3: - (8/7/20) Switched to Byron's XML - (7/7/20) Added 3 element cabinet position to the observation (for consistency with other environments) @@ -69,7 +69,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_plate_slide_sideway.xml") + return full_V3_path_for("sawyer_xyz/sawyer_plate_slide_sideway.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_plate_slide_back_v2.py b/metaworld/envs/sawyer_plate_slide_back_v3.py similarity index 96% rename from metaworld/envs/sawyer_plate_slide_back_v2.py rename to metaworld/envs/sawyer_plate_slide_back_v3.py index 2d50f5d99..523cf8fd3 100644 --- a/metaworld/envs/sawyer_plate_slide_back_v2.py +++ b/metaworld/envs/sawyer_plate_slide_back_v3.py @@ -7,13 +7,13 @@ from gymnasium.spaces import Box from scipy.spatial.transform import Rotation -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerPlateSlideBackEnvV2(SawyerXYZEnv): +class SawyerPlateSlideBackEnvV3(SawyerXYZEnv): def __init__( self, render_mode: RenderMode | None = None, @@ -54,7 +54,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_plate_slide.xml") + return full_V3_path_for("sawyer_xyz/sawyer_plate_slide.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_plate_slide_side_v2.py b/metaworld/envs/sawyer_plate_slide_side_v3.py similarity index 96% rename from metaworld/envs/sawyer_plate_slide_side_v2.py rename to metaworld/envs/sawyer_plate_slide_side_v3.py index 9936065d6..ff50ed5b4 100644 --- a/metaworld/envs/sawyer_plate_slide_side_v2.py +++ b/metaworld/envs/sawyer_plate_slide_side_v3.py @@ -7,13 +7,13 @@ from gymnasium.spaces import Box from scipy.spatial.transform import Rotation -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerPlateSlideSideEnvV2(SawyerXYZEnv): +class SawyerPlateSlideSideEnvV3(SawyerXYZEnv): def __init__( self, render_mode: RenderMode | None = None, @@ -54,7 +54,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_plate_slide_sideway.xml") + return full_V3_path_for("sawyer_xyz/sawyer_plate_slide_sideway.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_plate_slide_v2.py b/metaworld/envs/sawyer_plate_slide_v3.py similarity index 96% rename from metaworld/envs/sawyer_plate_slide_v2.py rename to metaworld/envs/sawyer_plate_slide_v3.py index 4cc22f273..9a7bc77fa 100644 --- a/metaworld/envs/sawyer_plate_slide_v2.py +++ b/metaworld/envs/sawyer_plate_slide_v3.py @@ -7,13 +7,13 @@ from gymnasium.spaces import Box from scipy.spatial.transform import Rotation -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerPlateSlideEnvV2(SawyerXYZEnv): +class SawyerPlateSlideEnvV3(SawyerXYZEnv): OBJ_RADIUS: float = 0.04 def __init__( @@ -56,7 +56,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_plate_slide.xml") + return full_V3_path_for("sawyer_xyz/sawyer_plate_slide.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_push_back_v2.py b/metaworld/envs/sawyer_push_back_v3.py similarity index 98% rename from metaworld/envs/sawyer_push_back_v2.py rename to metaworld/envs/sawyer_push_back_v3.py index 40bd4b00f..b1538f432 100644 --- a/metaworld/envs/sawyer_push_back_v2.py +++ b/metaworld/envs/sawyer_push_back_v3.py @@ -7,13 +7,13 @@ from gymnasium.spaces import Box from scipy.spatial.transform import Rotation -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerPushBackEnvV2(SawyerXYZEnv): +class SawyerPushBackEnvV3(SawyerXYZEnv): OBJ_RADIUS: float = 0.007 TARGET_RADIUS: float = 0.05 @@ -57,7 +57,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_push_back_v2.xml") + return full_V3_path_for("sawyer_xyz/sawyer_push_back_V3.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_push_v2.py b/metaworld/envs/sawyer_push_v3.py similarity index 96% rename from metaworld/envs/sawyer_push_v2.py rename to metaworld/envs/sawyer_push_v3.py index 1b75a96ee..b0661b0fd 100644 --- a/metaworld/envs/sawyer_push_v2.py +++ b/metaworld/envs/sawyer_push_v3.py @@ -7,19 +7,19 @@ from gymnasium.spaces import Box from scipy.spatial.transform import Rotation -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerPushEnvV2(SawyerXYZEnv): +class SawyerPushEnvV3(SawyerXYZEnv): """SawyerPushEnv. - Motivation for V2: + Motivation for V3: V1 was very difficult to solve because the observation didn't say where to move after reaching the puck. - Changelog from V1 to V2: + Changelog from V1 to V3: - (7/7/20) Removed 3 element vector. Replaced with 3 element position of the goal (for consistency with other environments) - (6/15/20) Added a 3 element vector to the observation. This vector @@ -73,7 +73,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_push_v2.xml") + return full_V3_path_for("sawyer_xyz/sawyer_push_V3.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_push_wall_v2.py b/metaworld/envs/sawyer_push_wall_v3.py similarity index 96% rename from metaworld/envs/sawyer_push_wall_v2.py rename to metaworld/envs/sawyer_push_wall_v3.py index a5b06a8fd..306b6255e 100644 --- a/metaworld/envs/sawyer_push_wall_v2.py +++ b/metaworld/envs/sawyer_push_wall_v3.py @@ -9,20 +9,20 @@ from gymnasium.spaces import Box from scipy.spatial.transform import Rotation -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerPushWallEnvV2(SawyerXYZEnv): - """SawyerPushEnvV2 updates SawyerReachPushPickPlaceWallEnv. +class SawyerPushWallEnvV3(SawyerXYZEnv): + """SawyerPushEnvV3 updates SawyerReachPushPickPlaceWallEnv. Env now handles only 'Push' task type from SawyerReachPushPickPlaceWallEnv. Observations now include a vector pointing from the objectposition to the goal position. Allows for scripted policy. - Changelog from V1 to V2: + Changelog from V1 to V3: - (7/7/20) Removed 3 element vector. Replaced with 3 element position of the goal (for consistency with other environments) - (6/15/20) Added a 3 element vector to the observation. This vector @@ -77,7 +77,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_push_wall_v2.xml") + return full_V3_path_for("sawyer_xyz/sawyer_push_wall_V3.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_reach_v2.py b/metaworld/envs/sawyer_reach_v3.py similarity index 96% rename from metaworld/envs/sawyer_reach_v2.py rename to metaworld/envs/sawyer_reach_v3.py index 01b8be8c3..215900efb 100644 --- a/metaworld/envs/sawyer_reach_v2.py +++ b/metaworld/envs/sawyer_reach_v3.py @@ -7,19 +7,19 @@ from gymnasium.spaces import Box from scipy.spatial.transform import Rotation -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerReachEnvV2(SawyerXYZEnv): +class SawyerReachEnvV3(SawyerXYZEnv): """SawyerReachEnv. - Motivation for V2: + Motivation for V3: V1 was very difficult to solve because the observation didn't say where to move (where to reach). - Changelog from V1 to V2: + Changelog from V1 to V3: - (7/7/20) Removed 3 element vector. Replaced with 3 element position of the goal (for consistency with other environments) - (6/15/20) Added a 3 element vector to the observation. This vector @@ -70,7 +70,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_reach_v2.xml") + return full_V3_path_for("sawyer_xyz/sawyer_reach_V3.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_reach_wall_v2.py b/metaworld/envs/sawyer_reach_wall_v3.py similarity index 95% rename from metaworld/envs/sawyer_reach_wall_v2.py rename to metaworld/envs/sawyer_reach_wall_v3.py index d3c4866f3..f8ba44eec 100644 --- a/metaworld/envs/sawyer_reach_wall_v2.py +++ b/metaworld/envs/sawyer_reach_wall_v3.py @@ -7,19 +7,19 @@ from gymnasium.spaces import Box from scipy.spatial.transform import Rotation -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerReachWallEnvV2(SawyerXYZEnv): +class SawyerReachWallEnvV3(SawyerXYZEnv): """SawyerReachWallEnv. - Motivation for V2: + Motivation for V3: V1 was difficult to solve since the observations didn't say where to move (where to reach). - Changelog from V1 to V2: + Changelog from V1 to V3: - (7/7/20) Removed 3 element vector. Replaced with 3 element position of the goal (for consistency with other environments) - (6/17/20) Separated reach from reach-push-pick-place. @@ -72,7 +72,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_reach_wall_v2.xml") + return full_V3_path_for("sawyer_xyz/sawyer_reach_wall_V3.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_shelf_place_v2.py b/metaworld/envs/sawyer_shelf_place_v3.py similarity index 97% rename from metaworld/envs/sawyer_shelf_place_v2.py rename to metaworld/envs/sawyer_shelf_place_v3.py index 027c43f65..a423c83a3 100644 --- a/metaworld/envs/sawyer_shelf_place_v2.py +++ b/metaworld/envs/sawyer_shelf_place_v3.py @@ -8,13 +8,13 @@ from gymnasium.spaces import Box from scipy.spatial.transform import Rotation -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerShelfPlaceEnvV2(SawyerXYZEnv): +class SawyerShelfPlaceEnvV3(SawyerXYZEnv): def __init__( self, render_mode: RenderMode | None = None, @@ -57,7 +57,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_shelf_placing.xml") + return full_V3_path_for("sawyer_xyz/sawyer_shelf_placing.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_soccer_v2.py b/metaworld/envs/sawyer_soccer_v3.py similarity index 98% rename from metaworld/envs/sawyer_soccer_v2.py rename to metaworld/envs/sawyer_soccer_v3.py index 9df81b6e3..f276cdfb9 100644 --- a/metaworld/envs/sawyer_soccer_v2.py +++ b/metaworld/envs/sawyer_soccer_v3.py @@ -7,13 +7,13 @@ from gymnasium.spaces import Box from scipy.spatial.transform import Rotation -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerSoccerEnvV2(SawyerXYZEnv): +class SawyerSoccerEnvV3(SawyerXYZEnv): OBJ_RADIUS: float = 0.013 TARGET_RADIUS: float = 0.07 @@ -57,7 +57,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_soccer.xml") + return full_V3_path_for("sawyer_xyz/sawyer_soccer.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_stick_pull_v2.py b/metaworld/envs/sawyer_stick_pull_v3.py similarity index 98% rename from metaworld/envs/sawyer_stick_pull_v2.py rename to metaworld/envs/sawyer_stick_pull_v3.py index 89fdf5b34..afa307d53 100644 --- a/metaworld/envs/sawyer_stick_pull_v2.py +++ b/metaworld/envs/sawyer_stick_pull_v3.py @@ -7,13 +7,13 @@ from gymnasium.spaces import Box from scipy.spatial.transform import Rotation -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import ObservationDict, StickInitConfigDict from metaworld.utils import reward_utils -class SawyerStickPullEnvV2(SawyerXYZEnv): +class SawyerStickPullEnvV3(SawyerXYZEnv): def __init__( self, render_mode: RenderMode | None = None, @@ -56,7 +56,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_stick_obj.xml") + return full_V3_path_for("sawyer_xyz/sawyer_stick_obj.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_stick_push_v2.py b/metaworld/envs/sawyer_stick_push_v3.py similarity index 98% rename from metaworld/envs/sawyer_stick_push_v2.py rename to metaworld/envs/sawyer_stick_push_v3.py index 0cd795386..acafec612 100644 --- a/metaworld/envs/sawyer_stick_push_v2.py +++ b/metaworld/envs/sawyer_stick_push_v3.py @@ -7,13 +7,13 @@ from gymnasium.spaces import Box from scipy.spatial.transform import Rotation -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import ObservationDict, StickInitConfigDict from metaworld.utils import reward_utils -class SawyerStickPushEnvV2(SawyerXYZEnv): +class SawyerStickPushEnvV3(SawyerXYZEnv): def __init__( self, render_mode: RenderMode | None = None, @@ -56,7 +56,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_stick_obj.xml") + return full_V3_path_for("sawyer_xyz/sawyer_stick_obj.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_sweep_into_goal_v2.py b/metaworld/envs/sawyer_sweep_into_goal_v3.py similarity index 98% rename from metaworld/envs/sawyer_sweep_into_goal_v2.py rename to metaworld/envs/sawyer_sweep_into_goal_v3.py index edcbda868..9890cf0ec 100644 --- a/metaworld/envs/sawyer_sweep_into_goal_v2.py +++ b/metaworld/envs/sawyer_sweep_into_goal_v3.py @@ -7,13 +7,13 @@ from gymnasium.spaces import Box from scipy.spatial.transform import Rotation -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerSweepIntoGoalEnvV2(SawyerXYZEnv): +class SawyerSweepIntoGoalEnvV3(SawyerXYZEnv): OBJ_RADIUS: float = 0.02 def __init__( @@ -56,7 +56,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_table_with_hole.xml") + return full_V3_path_for("sawyer_xyz/sawyer_table_with_hole.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_sweep_v2.py b/metaworld/envs/sawyer_sweep_v3.py similarity index 98% rename from metaworld/envs/sawyer_sweep_v2.py rename to metaworld/envs/sawyer_sweep_v3.py index e7e856427..e819cf436 100644 --- a/metaworld/envs/sawyer_sweep_v2.py +++ b/metaworld/envs/sawyer_sweep_v3.py @@ -6,13 +6,13 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerSweepEnvV2(SawyerXYZEnv): +class SawyerSweepEnvV3(SawyerXYZEnv): OBJ_RADIUS: float = 0.02 def __init__( @@ -56,7 +56,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_sweep_v2.xml") + return full_V3_path_for("sawyer_xyz/sawyer_sweep_V3.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_window_close_v2.py b/metaworld/envs/sawyer_window_close_v3.py similarity index 96% rename from metaworld/envs/sawyer_window_close_v2.py rename to metaworld/envs/sawyer_window_close_v3.py index 5c7def890..59eef4544 100644 --- a/metaworld/envs/sawyer_window_close_v2.py +++ b/metaworld/envs/sawyer_window_close_v3.py @@ -6,19 +6,19 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerWindowCloseEnvV2(SawyerXYZEnv): +class SawyerWindowCloseEnvV3(SawyerXYZEnv): """SawyerWindowCloseEnv. - Motivation for V2: + Motivation for V3: V1 was rarely solvable due to limited path length. The window usually only got ~25% closed before hitting max_path_length - Changelog from V1 to V2: + Changelog from V1 to V3: - (8/11/20) Updated to Byron's XML - (7/7/20) Added 3 element handle position to the observation (for consistency with other environments) @@ -71,7 +71,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_window_horizontal.xml") + return full_V3_path_for("sawyer_xyz/sawyer_window_horizontal.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/envs/sawyer_window_open_v2.py b/metaworld/envs/sawyer_window_open_v3.py similarity index 95% rename from metaworld/envs/sawyer_window_open_v2.py rename to metaworld/envs/sawyer_window_open_v3.py index 4e4dbc208..b729beadf 100644 --- a/metaworld/envs/sawyer_window_open_v2.py +++ b/metaworld/envs/sawyer_window_open_v3.py @@ -6,18 +6,18 @@ import numpy.typing as npt from gymnasium.spaces import Box -from metaworld.asset_path_utils import full_v2_path_for +from metaworld.asset_path_utils import full_V3_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv from metaworld.types import InitConfigDict from metaworld.utils import reward_utils -class SawyerWindowOpenEnvV2(SawyerXYZEnv): +class SawyerWindowOpenEnvV3(SawyerXYZEnv): """SawyerWindowOpenEnv. - Motivation for V2: + Motivation for V3: When V1 scripted policy failed, it was often due to limited path length. - Changelog from V1 to V2: + Changelog from V1 to V3: - (8/11/20) Updated to Byron's XML - (7/7/20) Added 3 element handle position to the observation (for consistency with other environments) @@ -67,7 +67,7 @@ def __init__( @property def model_name(self) -> str: - return full_v2_path_for("sawyer_xyz/sawyer_window_horizontal.xml") + return full_V3_path_for("sawyer_xyz/sawyer_window_horizontal.xml") @SawyerXYZEnv._Decorators.assert_task_is_set def evaluate_state( diff --git a/metaworld/policies/__init__.py b/metaworld/policies/__init__.py index 60c72cfe1..bbe1285b8 100644 --- a/metaworld/policies/__init__.py +++ b/metaworld/policies/__init__.py @@ -1,127 +1,127 @@ -from metaworld.policies.sawyer_assembly_v2_policy import SawyerAssemblyV2Policy -from metaworld.policies.sawyer_basketball_v2_policy import SawyerBasketballV2Policy -from metaworld.policies.sawyer_bin_picking_v2_policy import SawyerBinPickingV2Policy -from metaworld.policies.sawyer_box_close_v2_policy import SawyerBoxCloseV2Policy -from metaworld.policies.sawyer_button_press_topdown_v2_policy import ( - SawyerButtonPressTopdownV2Policy, +from metaworld.policies.sawyer_assembly_v3_policy import SawyerAssemblyV3Policy +from metaworld.policies.sawyer_basketball_v3_policy import SawyerBasketballV3Policy +from metaworld.policies.sawyer_bin_picking_v3_policy import SawyerBinPickingV3Policy +from metaworld.policies.sawyer_box_close_v3_policy import SawyerBoxCloseV3Policy +from metaworld.policies.sawyer_button_press_topdown_v3_policy import ( + SawyerButtonPressTopdownV3Policy, ) -from metaworld.policies.sawyer_button_press_topdown_wall_v2_policy import ( - SawyerButtonPressTopdownWallV2Policy, +from metaworld.policies.sawyer_button_press_topdown_wall_v3_policy import ( + SawyerButtonPressTopdownWallV3Policy, ) -from metaworld.policies.sawyer_button_press_v2_policy import SawyerButtonPressV2Policy -from metaworld.policies.sawyer_button_press_wall_v2_policy import ( - SawyerButtonPressWallV2Policy, +from metaworld.policies.sawyer_button_press_v3_policy import SawyerButtonPressV3Policy +from metaworld.policies.sawyer_button_press_wall_v3_policy import ( + SawyerButtonPressWallV3Policy, ) -from metaworld.policies.sawyer_coffee_button_v2_policy import SawyerCoffeeButtonV2Policy -from metaworld.policies.sawyer_coffee_pull_v2_policy import SawyerCoffeePullV2Policy -from metaworld.policies.sawyer_coffee_push_v2_policy import SawyerCoffeePushV2Policy -from metaworld.policies.sawyer_dial_turn_v2_policy import SawyerDialTurnV2Policy -from metaworld.policies.sawyer_disassemble_v2_policy import SawyerDisassembleV2Policy -from metaworld.policies.sawyer_door_close_v2_policy import SawyerDoorCloseV2Policy -from metaworld.policies.sawyer_door_lock_v2_policy import SawyerDoorLockV2Policy -from metaworld.policies.sawyer_door_open_v2_policy import SawyerDoorOpenV2Policy -from metaworld.policies.sawyer_door_unlock_v2_policy import SawyerDoorUnlockV2Policy -from metaworld.policies.sawyer_drawer_close_v2_policy import SawyerDrawerCloseV2Policy -from metaworld.policies.sawyer_drawer_open_v2_policy import SawyerDrawerOpenV2Policy -from metaworld.policies.sawyer_faucet_close_v2_policy import SawyerFaucetCloseV2Policy -from metaworld.policies.sawyer_faucet_open_v2_policy import SawyerFaucetOpenV2Policy -from metaworld.policies.sawyer_hammer_v2_policy import SawyerHammerV2Policy -from metaworld.policies.sawyer_hand_insert_v2_policy import SawyerHandInsertV2Policy -from metaworld.policies.sawyer_handle_press_side_v2_policy import ( - SawyerHandlePressSideV2Policy, +from metaworld.policies.sawyer_coffee_button_v3_policy import SawyerCoffeeButtonV3Policy +from metaworld.policies.sawyer_coffee_pull_v3_policy import SawyerCoffeePullV3Policy +from metaworld.policies.sawyer_coffee_push_v3_policy import SawyerCoffeePushV3Policy +from metaworld.policies.sawyer_dial_turn_v3_policy import SawyerDialTurnV3Policy +from metaworld.policies.sawyer_disassemble_v3_policy import SawyerDisassembleV3Policy +from metaworld.policies.sawyer_door_close_v3_policy import SawyerDoorCloseV3Policy +from metaworld.policies.sawyer_door_lock_v3_policy import SawyerDoorLockV3Policy +from metaworld.policies.sawyer_door_open_v3_policy import SawyerDoorOpenV3Policy +from metaworld.policies.sawyer_door_unlock_v3_policy import SawyerDoorUnlockV3Policy +from metaworld.policies.sawyer_drawer_close_v3_policy import SawyerDrawerCloseV3Policy +from metaworld.policies.sawyer_drawer_open_v3_policy import SawyerDrawerOpenV3Policy +from metaworld.policies.sawyer_faucet_close_v3_policy import SawyerFaucetCloseV3Policy +from metaworld.policies.sawyer_faucet_open_v3_policy import SawyerFaucetOpenV3Policy +from metaworld.policies.sawyer_hammer_v3_policy import SawyerHammerV3Policy +from metaworld.policies.sawyer_hand_insert_v3_policy import SawyerHandInsertV3Policy +from metaworld.policies.sawyer_handle_press_side_v3_policy import ( + SawyerHandlePressSideV3Policy, ) -from metaworld.policies.sawyer_handle_press_v2_policy import SawyerHandlePressV2Policy -from metaworld.policies.sawyer_handle_pull_side_v2_policy import ( - SawyerHandlePullSideV2Policy, +from metaworld.policies.sawyer_handle_press_v3_policy import SawyerHandlePressV3Policy +from metaworld.policies.sawyer_handle_pull_side_v3_policy import ( + SawyerHandlePullSideV3Policy, ) -from metaworld.policies.sawyer_handle_pull_v2_policy import SawyerHandlePullV2Policy -from metaworld.policies.sawyer_lever_pull_v2_policy import SawyerLeverPullV2Policy -from metaworld.policies.sawyer_peg_insertion_side_v2_policy import ( - SawyerPegInsertionSideV2Policy, +from metaworld.policies.sawyer_handle_pull_v3_policy import SawyerHandlePullV3Policy +from metaworld.policies.sawyer_lever_pull_v3_policy import SawyerLeverPullV3Policy +from metaworld.policies.sawyer_peg_insertion_side_v3_policy import ( + SawyerPegInsertionSideV3Policy, ) -from metaworld.policies.sawyer_peg_unplug_side_v2_policy import ( - SawyerPegUnplugSideV2Policy, +from metaworld.policies.sawyer_peg_unplug_side_v3_policy import ( + SawyerPegUnplugSideV3Policy, ) -from metaworld.policies.sawyer_pick_out_of_hole_v2_policy import ( - SawyerPickOutOfHoleV2Policy, +from metaworld.policies.sawyer_pick_out_of_hole_v3_policy import ( + SawyerPickOutOfHoleV3Policy, ) -from metaworld.policies.sawyer_pick_place_v2_policy import SawyerPickPlaceV2Policy -from metaworld.policies.sawyer_pick_place_wall_v2_policy import ( - SawyerPickPlaceWallV2Policy, +from metaworld.policies.sawyer_pick_place_v3_policy import SawyerPickPlaceV3Policy +from metaworld.policies.sawyer_pick_place_wall_v3_policy import ( + SawyerPickPlaceWallV3Policy, ) -from metaworld.policies.sawyer_plate_slide_back_side_v2_policy import ( - SawyerPlateSlideBackSideV2Policy, +from metaworld.policies.sawyer_plate_slide_back_side_v3_policy import ( + SawyerPlateSlideBackSideV3Policy, ) -from metaworld.policies.sawyer_plate_slide_back_v2_policy import ( - SawyerPlateSlideBackV2Policy, +from metaworld.policies.sawyer_plate_slide_back_v3_policy import ( + SawyerPlateSlideBackV3Policy, ) -from metaworld.policies.sawyer_plate_slide_side_v2_policy import ( - SawyerPlateSlideSideV2Policy, +from metaworld.policies.sawyer_plate_slide_side_v3_policy import ( + SawyerPlateSlideSideV3Policy, ) -from metaworld.policies.sawyer_plate_slide_v2_policy import SawyerPlateSlideV2Policy -from metaworld.policies.sawyer_push_back_v2_policy import SawyerPushBackV2Policy -from metaworld.policies.sawyer_push_v2_policy import SawyerPushV2Policy -from metaworld.policies.sawyer_push_wall_v2_policy import SawyerPushWallV2Policy -from metaworld.policies.sawyer_reach_v2_policy import SawyerReachV2Policy -from metaworld.policies.sawyer_reach_wall_v2_policy import SawyerReachWallV2Policy -from metaworld.policies.sawyer_shelf_place_v2_policy import SawyerShelfPlaceV2Policy -from metaworld.policies.sawyer_soccer_v2_policy import SawyerSoccerV2Policy -from metaworld.policies.sawyer_stick_pull_v2_policy import SawyerStickPullV2Policy -from metaworld.policies.sawyer_stick_push_v2_policy import SawyerStickPushV2Policy -from metaworld.policies.sawyer_sweep_into_v2_policy import SawyerSweepIntoV2Policy -from metaworld.policies.sawyer_sweep_v2_policy import SawyerSweepV2Policy -from metaworld.policies.sawyer_window_close_v2_policy import SawyerWindowCloseV2Policy -from metaworld.policies.sawyer_window_open_v2_policy import SawyerWindowOpenV2Policy +from metaworld.policies.sawyer_plate_slide_v3_policy import SawyerPlateSlideV3Policy +from metaworld.policies.sawyer_push_back_v3_policy import SawyerPushBackV3Policy +from metaworld.policies.sawyer_push_v3_policy import SawyerPushV3Policy +from metaworld.policies.sawyer_push_wall_v3_policy import SawyerPushWallV3Policy +from metaworld.policies.sawyer_reach_v3_policy import SawyerReachV3Policy +from metaworld.policies.sawyer_reach_wall_v3_policy import SawyerReachWallV3Policy +from metaworld.policies.sawyer_shelf_place_v3_policy import SawyerShelfPlaceV3Policy +from metaworld.policies.sawyer_soccer_v3_policy import SawyerSoccerV3Policy +from metaworld.policies.sawyer_stick_pull_v3_policy import SawyerStickPullV3Policy +from metaworld.policies.sawyer_stick_push_v3_policy import SawyerStickPushV3Policy +from metaworld.policies.sawyer_sweep_into_v3_policy import SawyerSweepIntoV3Policy +from metaworld.policies.sawyer_sweep_v3_policy import SawyerSweepV3Policy +from metaworld.policies.sawyer_window_close_v3_policy import SawyerWindowCloseV3Policy +from metaworld.policies.sawyer_window_open_v3_policy import SawyerWindowOpenV3Policy __all__ = [ - "SawyerAssemblyV2Policy", - "SawyerBasketballV2Policy", - "SawyerBinPickingV2Policy", - "SawyerBoxCloseV2Policy", - "SawyerButtonPressTopdownV2Policy", - "SawyerButtonPressTopdownWallV2Policy", - "SawyerButtonPressV2Policy", - "SawyerButtonPressWallV2Policy", - "SawyerCoffeeButtonV2Policy", - "SawyerCoffeePullV2Policy", - "SawyerCoffeePushV2Policy", - "SawyerDialTurnV2Policy", - "SawyerDisassembleV2Policy", - "SawyerDoorCloseV2Policy", - "SawyerDoorLockV2Policy", - "SawyerDoorOpenV2Policy", - "SawyerDoorUnlockV2Policy", - "SawyerDrawerCloseV2Policy", - "SawyerDrawerOpenV2Policy", - "SawyerFaucetCloseV2Policy", - "SawyerFaucetOpenV2Policy", - "SawyerHammerV2Policy", - "SawyerHandInsertV2Policy", - "SawyerHandlePressSideV2Policy", - "SawyerHandlePressV2Policy", - "SawyerHandlePullSideV2Policy", - "SawyerHandlePullV2Policy", - "SawyerLeverPullV2Policy", - "SawyerPegInsertionSideV2Policy", - "SawyerPegUnplugSideV2Policy", - "SawyerPickOutOfHoleV2Policy", - "SawyerPickPlaceV2Policy", - "SawyerPickPlaceWallV2Policy", - "SawyerPlateSlideBackSideV2Policy", - "SawyerPlateSlideBackV2Policy", - "SawyerPlateSlideSideV2Policy", - "SawyerPlateSlideV2Policy", - "SawyerPushBackV2Policy", - "SawyerPushV2Policy", - "SawyerPushWallV2Policy", - "SawyerReachV2Policy", - "SawyerReachWallV2Policy", - "SawyerShelfPlaceV2Policy", - "SawyerSoccerV2Policy", - "SawyerStickPullV2Policy", - "SawyerStickPushV2Policy", - "SawyerSweepIntoV2Policy", - "SawyerSweepV2Policy", - "SawyerWindowOpenV2Policy", - "SawyerWindowCloseV2Policy", + "SawyerAssemblyV3Policy", + "SawyerBasketballV3Policy", + "SawyerBinPickingV3Policy", + "SawyerBoxCloseV3Policy", + "SawyerButtonPressTopdownV3Policy", + "SawyerButtonPressTopdownWallV3Policy", + "SawyerButtonPressV3Policy", + "SawyerButtonPressWallV3Policy", + "SawyerCoffeeButtonV3Policy", + "SawyerCoffeePullV3Policy", + "SawyerCoffeePushV3Policy", + "SawyerDialTurnV3Policy", + "SawyerDisassembleV3Policy", + "SawyerDoorCloseV3Policy", + "SawyerDoorLockV3Policy", + "SawyerDoorOpenV3Policy", + "SawyerDoorUnlockV3Policy", + "SawyerDrawerCloseV3Policy", + "SawyerDrawerOpenV3Policy", + "SawyerFaucetCloseV3Policy", + "SawyerFaucetOpenV3Policy", + "SawyerHammerV3Policy", + "SawyerHandInsertV3Policy", + "SawyerHandlePressSideV3Policy", + "SawyerHandlePressV3Policy", + "SawyerHandlePullSideV3Policy", + "SawyerHandlePullV3Policy", + "SawyerLeverPullV3Policy", + "SawyerPegInsertionSideV3Policy", + "SawyerPegUnplugSideV3Policy", + "SawyerPickOutOfHoleV3Policy", + "SawyerPickPlaceV3Policy", + "SawyerPickPlaceWallV3Policy", + "SawyerPlateSlideBackSideV3Policy", + "SawyerPlateSlideBackV3Policy", + "SawyerPlateSlideSideV3Policy", + "SawyerPlateSlideV3Policy", + "SawyerPushBackV3Policy", + "SawyerPushV3Policy", + "SawyerPushWallV3Policy", + "SawyerReachV3Policy", + "SawyerReachWallV3Policy", + "SawyerShelfPlaceV3Policy", + "SawyerSoccerV3Policy", + "SawyerStickPullV3Policy", + "SawyerStickPushV3Policy", + "SawyerSweepIntoV3Policy", + "SawyerSweepV3Policy", + "SawyerWindowOpenV3Policy", + "SawyerWindowCloseV3Policy", ] diff --git a/metaworld/policies/sawyer_assembly_v2_policy.py b/metaworld/policies/sawyer_assembly_v3_policy.py similarity index 98% rename from metaworld/policies/sawyer_assembly_v2_policy.py rename to metaworld/policies/sawyer_assembly_v3_policy.py index 4b5378ae6..d33304510 100644 --- a/metaworld/policies/sawyer_assembly_v2_policy.py +++ b/metaworld/policies/sawyer_assembly_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerAssemblyV2Policy(Policy): +class SawyerAssemblyV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_basketball_v2_policy.py b/metaworld/policies/sawyer_basketball_v3_policy.py similarity index 98% rename from metaworld/policies/sawyer_basketball_v2_policy.py rename to metaworld/policies/sawyer_basketball_v3_policy.py index d2ebefc8f..95db9cd76 100644 --- a/metaworld/policies/sawyer_basketball_v2_policy.py +++ b/metaworld/policies/sawyer_basketball_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerBasketballV2Policy(Policy): +class SawyerBasketballV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_bin_picking_v2_policy.py b/metaworld/policies/sawyer_bin_picking_v3_policy.py similarity index 98% rename from metaworld/policies/sawyer_bin_picking_v2_policy.py rename to metaworld/policies/sawyer_bin_picking_v3_policy.py index 53464d96d..38572160d 100644 --- a/metaworld/policies/sawyer_bin_picking_v2_policy.py +++ b/metaworld/policies/sawyer_bin_picking_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerBinPickingV2Policy(Policy): +class SawyerBinPickingV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_box_close_v2_policy.py b/metaworld/policies/sawyer_box_close_v3_policy.py similarity index 98% rename from metaworld/policies/sawyer_box_close_v2_policy.py rename to metaworld/policies/sawyer_box_close_v3_policy.py index f4b967548..6edb2d688 100644 --- a/metaworld/policies/sawyer_box_close_v2_policy.py +++ b/metaworld/policies/sawyer_box_close_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerBoxCloseV2Policy(Policy): +class SawyerBoxCloseV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_button_press_topdown_v2_policy.py b/metaworld/policies/sawyer_button_press_topdown_v3_policy.py similarity index 96% rename from metaworld/policies/sawyer_button_press_topdown_v2_policy.py rename to metaworld/policies/sawyer_button_press_topdown_v3_policy.py index d8a685c9a..73c519d62 100644 --- a/metaworld/policies/sawyer_button_press_topdown_v2_policy.py +++ b/metaworld/policies/sawyer_button_press_topdown_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerButtonPressTopdownV2Policy(Policy): +class SawyerButtonPressTopdownV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_button_press_topdown_wall_v2_policy.py b/metaworld/policies/sawyer_button_press_topdown_wall_v3_policy.py similarity index 96% rename from metaworld/policies/sawyer_button_press_topdown_wall_v2_policy.py rename to metaworld/policies/sawyer_button_press_topdown_wall_v3_policy.py index fddfb8d28..bc67b2780 100644 --- a/metaworld/policies/sawyer_button_press_topdown_wall_v2_policy.py +++ b/metaworld/policies/sawyer_button_press_topdown_wall_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerButtonPressTopdownWallV2Policy(Policy): +class SawyerButtonPressTopdownWallV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_button_press_v2_policy.py b/metaworld/policies/sawyer_button_press_v3_policy.py similarity index 97% rename from metaworld/policies/sawyer_button_press_v2_policy.py rename to metaworld/policies/sawyer_button_press_v3_policy.py index 82d7e6548..22e7f1db5 100644 --- a/metaworld/policies/sawyer_button_press_v2_policy.py +++ b/metaworld/policies/sawyer_button_press_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, move -class SawyerButtonPressV2Policy(Policy): +class SawyerButtonPressV3Policy(Policy): @staticmethod def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: return { diff --git a/metaworld/policies/sawyer_button_press_wall_v2_policy.py b/metaworld/policies/sawyer_button_press_wall_v3_policy.py similarity index 97% rename from metaworld/policies/sawyer_button_press_wall_v2_policy.py rename to metaworld/policies/sawyer_button_press_wall_v3_policy.py index 16635379d..99a23b8ae 100644 --- a/metaworld/policies/sawyer_button_press_wall_v2_policy.py +++ b/metaworld/policies/sawyer_button_press_wall_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, move -class SawyerButtonPressWallV2Policy(Policy): +class SawyerButtonPressWallV3Policy(Policy): @staticmethod def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: return { diff --git a/metaworld/policies/sawyer_coffee_button_v2_policy.py b/metaworld/policies/sawyer_coffee_button_v3_policy.py similarity index 96% rename from metaworld/policies/sawyer_coffee_button_v2_policy.py rename to metaworld/policies/sawyer_coffee_button_v3_policy.py index 3a451961e..42d0411da 100644 --- a/metaworld/policies/sawyer_coffee_button_v2_policy.py +++ b/metaworld/policies/sawyer_coffee_button_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerCoffeeButtonV2Policy(Policy): +class SawyerCoffeeButtonV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_coffee_pull_v2_policy.py b/metaworld/policies/sawyer_coffee_pull_v3_policy.py similarity index 97% rename from metaworld/policies/sawyer_coffee_pull_v2_policy.py rename to metaworld/policies/sawyer_coffee_pull_v3_policy.py index 6a812b9bc..7674d2a81 100644 --- a/metaworld/policies/sawyer_coffee_pull_v2_policy.py +++ b/metaworld/policies/sawyer_coffee_pull_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerCoffeePullV2Policy(Policy): +class SawyerCoffeePullV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_coffee_push_v2_policy.py b/metaworld/policies/sawyer_coffee_push_v3_policy.py similarity index 97% rename from metaworld/policies/sawyer_coffee_push_v2_policy.py rename to metaworld/policies/sawyer_coffee_push_v3_policy.py index dbc8c645a..df70f628a 100644 --- a/metaworld/policies/sawyer_coffee_push_v2_policy.py +++ b/metaworld/policies/sawyer_coffee_push_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerCoffeePushV2Policy(Policy): +class SawyerCoffeePushV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_dial_turn_v2_policy.py b/metaworld/policies/sawyer_dial_turn_v3_policy.py similarity index 97% rename from metaworld/policies/sawyer_dial_turn_v2_policy.py rename to metaworld/policies/sawyer_dial_turn_v3_policy.py index 096408565..cf1e96cd8 100644 --- a/metaworld/policies/sawyer_dial_turn_v2_policy.py +++ b/metaworld/policies/sawyer_dial_turn_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerDialTurnV2Policy(Policy): +class SawyerDialTurnV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_disassemble_v2_policy.py b/metaworld/policies/sawyer_disassemble_v3_policy.py similarity index 98% rename from metaworld/policies/sawyer_disassemble_v2_policy.py rename to metaworld/policies/sawyer_disassemble_v3_policy.py index bdc9e397d..8068def78 100644 --- a/metaworld/policies/sawyer_disassemble_v2_policy.py +++ b/metaworld/policies/sawyer_disassemble_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerDisassembleV2Policy(Policy): +class SawyerDisassembleV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_door_close_v2_policy.py b/metaworld/policies/sawyer_door_close_v3_policy.py similarity index 98% rename from metaworld/policies/sawyer_door_close_v2_policy.py rename to metaworld/policies/sawyer_door_close_v3_policy.py index 9b6997b63..ecd3e98c4 100644 --- a/metaworld/policies/sawyer_door_close_v2_policy.py +++ b/metaworld/policies/sawyer_door_close_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerDoorCloseV2Policy(Policy): +class SawyerDoorCloseV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_door_lock_v2_policy.py b/metaworld/policies/sawyer_door_lock_v3_policy.py similarity index 97% rename from metaworld/policies/sawyer_door_lock_v2_policy.py rename to metaworld/policies/sawyer_door_lock_v3_policy.py index 546d1f26f..b45ab3e22 100644 --- a/metaworld/policies/sawyer_door_lock_v2_policy.py +++ b/metaworld/policies/sawyer_door_lock_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerDoorLockV2Policy(Policy): +class SawyerDoorLockV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_door_open_v2_policy.py b/metaworld/policies/sawyer_door_open_v3_policy.py similarity index 97% rename from metaworld/policies/sawyer_door_open_v2_policy.py rename to metaworld/policies/sawyer_door_open_v3_policy.py index 4771e3f79..b25f33d55 100644 --- a/metaworld/policies/sawyer_door_open_v2_policy.py +++ b/metaworld/policies/sawyer_door_open_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerDoorOpenV2Policy(Policy): +class SawyerDoorOpenV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_door_unlock_v2_policy.py b/metaworld/policies/sawyer_door_unlock_v3_policy.py similarity index 97% rename from metaworld/policies/sawyer_door_unlock_v2_policy.py rename to metaworld/policies/sawyer_door_unlock_v3_policy.py index eb8fe650c..42e85d184 100644 --- a/metaworld/policies/sawyer_door_unlock_v2_policy.py +++ b/metaworld/policies/sawyer_door_unlock_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerDoorUnlockV2Policy(Policy): +class SawyerDoorUnlockV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_drawer_close_v2_policy.py b/metaworld/policies/sawyer_drawer_close_v3_policy.py similarity index 97% rename from metaworld/policies/sawyer_drawer_close_v2_policy.py rename to metaworld/policies/sawyer_drawer_close_v3_policy.py index fa212dc0a..598b642b1 100644 --- a/metaworld/policies/sawyer_drawer_close_v2_policy.py +++ b/metaworld/policies/sawyer_drawer_close_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerDrawerCloseV2Policy(Policy): +class SawyerDrawerCloseV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_drawer_open_v2_policy.py b/metaworld/policies/sawyer_drawer_open_v3_policy.py similarity index 97% rename from metaworld/policies/sawyer_drawer_open_v2_policy.py rename to metaworld/policies/sawyer_drawer_open_v3_policy.py index 9e7a519c8..5b0a56667 100644 --- a/metaworld/policies/sawyer_drawer_open_v2_policy.py +++ b/metaworld/policies/sawyer_drawer_open_v3_policy.py @@ -7,7 +7,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerDrawerOpenV2Policy(Policy): +class SawyerDrawerOpenV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_faucet_close_v2_policy.py b/metaworld/policies/sawyer_faucet_close_v3_policy.py similarity index 97% rename from metaworld/policies/sawyer_faucet_close_v2_policy.py rename to metaworld/policies/sawyer_faucet_close_v3_policy.py index 8367723e7..21cf80afd 100644 --- a/metaworld/policies/sawyer_faucet_close_v2_policy.py +++ b/metaworld/policies/sawyer_faucet_close_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerFaucetCloseV2Policy(Policy): +class SawyerFaucetCloseV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_faucet_open_v2_policy.py b/metaworld/policies/sawyer_faucet_open_v3_policy.py similarity index 97% rename from metaworld/policies/sawyer_faucet_open_v2_policy.py rename to metaworld/policies/sawyer_faucet_open_v3_policy.py index 07fd883b0..a7fbe2a50 100644 --- a/metaworld/policies/sawyer_faucet_open_v2_policy.py +++ b/metaworld/policies/sawyer_faucet_open_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerFaucetOpenV2Policy(Policy): +class SawyerFaucetOpenV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_hammer_v2_policy.py b/metaworld/policies/sawyer_hammer_v3_policy.py similarity index 98% rename from metaworld/policies/sawyer_hammer_v2_policy.py rename to metaworld/policies/sawyer_hammer_v3_policy.py index 98d484aed..93cab56d1 100644 --- a/metaworld/policies/sawyer_hammer_v2_policy.py +++ b/metaworld/policies/sawyer_hammer_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerHammerV2Policy(Policy): +class SawyerHammerV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_hand_insert_v2_policy.py b/metaworld/policies/sawyer_hand_insert_v3_policy.py similarity index 98% rename from metaworld/policies/sawyer_hand_insert_v2_policy.py rename to metaworld/policies/sawyer_hand_insert_v3_policy.py index 8037598ac..69580cda1 100644 --- a/metaworld/policies/sawyer_hand_insert_v2_policy.py +++ b/metaworld/policies/sawyer_hand_insert_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerHandInsertV2Policy(Policy): +class SawyerHandInsertV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_handle_press_side_v2_policy.py b/metaworld/policies/sawyer_handle_press_side_v3_policy.py similarity index 96% rename from metaworld/policies/sawyer_handle_press_side_v2_policy.py rename to metaworld/policies/sawyer_handle_press_side_v3_policy.py index 5cd684b2e..62562dbb6 100644 --- a/metaworld/policies/sawyer_handle_press_side_v2_policy.py +++ b/metaworld/policies/sawyer_handle_press_side_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerHandlePressSideV2Policy(Policy): +class SawyerHandlePressSideV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_handle_press_v2_policy.py b/metaworld/policies/sawyer_handle_press_v3_policy.py similarity index 96% rename from metaworld/policies/sawyer_handle_press_v2_policy.py rename to metaworld/policies/sawyer_handle_press_v3_policy.py index 657e628b5..1a4d55569 100644 --- a/metaworld/policies/sawyer_handle_press_v2_policy.py +++ b/metaworld/policies/sawyer_handle_press_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerHandlePressV2Policy(Policy): +class SawyerHandlePressV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_handle_pull_side_v2_policy.py b/metaworld/policies/sawyer_handle_pull_side_v3_policy.py similarity index 97% rename from metaworld/policies/sawyer_handle_pull_side_v2_policy.py rename to metaworld/policies/sawyer_handle_pull_side_v3_policy.py index a8855de97..4cc462165 100644 --- a/metaworld/policies/sawyer_handle_pull_side_v2_policy.py +++ b/metaworld/policies/sawyer_handle_pull_side_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerHandlePullSideV2Policy(Policy): +class SawyerHandlePullSideV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_handle_pull_v2_policy.py b/metaworld/policies/sawyer_handle_pull_v3_policy.py similarity index 97% rename from metaworld/policies/sawyer_handle_pull_v2_policy.py rename to metaworld/policies/sawyer_handle_pull_v3_policy.py index 903d84862..714dfe48f 100644 --- a/metaworld/policies/sawyer_handle_pull_v2_policy.py +++ b/metaworld/policies/sawyer_handle_pull_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerHandlePullV2Policy(Policy): +class SawyerHandlePullV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_lever_pull_v2_policy.py b/metaworld/policies/sawyer_lever_pull_v3_policy.py similarity index 97% rename from metaworld/policies/sawyer_lever_pull_v2_policy.py rename to metaworld/policies/sawyer_lever_pull_v3_policy.py index cf05ea937..553d3c420 100644 --- a/metaworld/policies/sawyer_lever_pull_v2_policy.py +++ b/metaworld/policies/sawyer_lever_pull_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerLeverPullV2Policy(Policy): +class SawyerLeverPullV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_peg_insertion_side_v2_policy.py b/metaworld/policies/sawyer_peg_insertion_side_v3_policy.py similarity index 97% rename from metaworld/policies/sawyer_peg_insertion_side_v2_policy.py rename to metaworld/policies/sawyer_peg_insertion_side_v3_policy.py index 6dbdde980..3763a4576 100644 --- a/metaworld/policies/sawyer_peg_insertion_side_v2_policy.py +++ b/metaworld/policies/sawyer_peg_insertion_side_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerPegInsertionSideV2Policy(Policy): +class SawyerPegInsertionSideV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_peg_unplug_side_v2_policy.py b/metaworld/policies/sawyer_peg_unplug_side_v3_policy.py similarity index 97% rename from metaworld/policies/sawyer_peg_unplug_side_v2_policy.py rename to metaworld/policies/sawyer_peg_unplug_side_v3_policy.py index f05f76cfa..f080c0a67 100644 --- a/metaworld/policies/sawyer_peg_unplug_side_v2_policy.py +++ b/metaworld/policies/sawyer_peg_unplug_side_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerPegUnplugSideV2Policy(Policy): +class SawyerPegUnplugSideV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_pick_out_of_hole_v2_policy.py b/metaworld/policies/sawyer_pick_out_of_hole_v3_policy.py similarity index 98% rename from metaworld/policies/sawyer_pick_out_of_hole_v2_policy.py rename to metaworld/policies/sawyer_pick_out_of_hole_v3_policy.py index 5182168f8..469ed89c2 100644 --- a/metaworld/policies/sawyer_pick_out_of_hole_v2_policy.py +++ b/metaworld/policies/sawyer_pick_out_of_hole_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerPickOutOfHoleV2Policy(Policy): +class SawyerPickOutOfHoleV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_pick_place_v2_policy.py b/metaworld/policies/sawyer_pick_place_v3_policy.py similarity index 98% rename from metaworld/policies/sawyer_pick_place_v2_policy.py rename to metaworld/policies/sawyer_pick_place_v3_policy.py index bef796190..dc52b4aee 100644 --- a/metaworld/policies/sawyer_pick_place_v2_policy.py +++ b/metaworld/policies/sawyer_pick_place_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerPickPlaceV2Policy(Policy): +class SawyerPickPlaceV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_pick_place_wall_v2_policy.py b/metaworld/policies/sawyer_pick_place_wall_v3_policy.py similarity index 98% rename from metaworld/policies/sawyer_pick_place_wall_v2_policy.py rename to metaworld/policies/sawyer_pick_place_wall_v3_policy.py index 3b6ba3915..872eef8c9 100644 --- a/metaworld/policies/sawyer_pick_place_wall_v2_policy.py +++ b/metaworld/policies/sawyer_pick_place_wall_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerPickPlaceWallV2Policy(Policy): +class SawyerPickPlaceWallV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_plate_slide_back_side_v2_policy.py b/metaworld/policies/sawyer_plate_slide_back_side_v3_policy.py similarity index 96% rename from metaworld/policies/sawyer_plate_slide_back_side_v2_policy.py rename to metaworld/policies/sawyer_plate_slide_back_side_v3_policy.py index 437424f43..c9b98e415 100644 --- a/metaworld/policies/sawyer_plate_slide_back_side_v2_policy.py +++ b/metaworld/policies/sawyer_plate_slide_back_side_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerPlateSlideBackSideV2Policy(Policy): +class SawyerPlateSlideBackSideV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_plate_slide_back_v2_policy.py b/metaworld/policies/sawyer_plate_slide_back_v3_policy.py similarity index 97% rename from metaworld/policies/sawyer_plate_slide_back_v2_policy.py rename to metaworld/policies/sawyer_plate_slide_back_v3_policy.py index 7b17e0d62..fd002d68f 100644 --- a/metaworld/policies/sawyer_plate_slide_back_v2_policy.py +++ b/metaworld/policies/sawyer_plate_slide_back_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerPlateSlideBackV2Policy(Policy): +class SawyerPlateSlideBackV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_plate_slide_side_v2_policy.py b/metaworld/policies/sawyer_plate_slide_side_v3_policy.py similarity index 97% rename from metaworld/policies/sawyer_plate_slide_side_v2_policy.py rename to metaworld/policies/sawyer_plate_slide_side_v3_policy.py index fe23906fa..0fe992d1f 100644 --- a/metaworld/policies/sawyer_plate_slide_side_v2_policy.py +++ b/metaworld/policies/sawyer_plate_slide_side_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerPlateSlideSideV2Policy(Policy): +class SawyerPlateSlideSideV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_plate_slide_v2_policy.py b/metaworld/policies/sawyer_plate_slide_v3_policy.py similarity index 97% rename from metaworld/policies/sawyer_plate_slide_v2_policy.py rename to metaworld/policies/sawyer_plate_slide_v3_policy.py index 0690f86d5..3a1d10bc1 100644 --- a/metaworld/policies/sawyer_plate_slide_v2_policy.py +++ b/metaworld/policies/sawyer_plate_slide_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerPlateSlideV2Policy(Policy): +class SawyerPlateSlideV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_push_back_v2_policy.py b/metaworld/policies/sawyer_push_back_v3_policy.py similarity index 98% rename from metaworld/policies/sawyer_push_back_v2_policy.py rename to metaworld/policies/sawyer_push_back_v3_policy.py index d3721c147..7d3480765 100644 --- a/metaworld/policies/sawyer_push_back_v2_policy.py +++ b/metaworld/policies/sawyer_push_back_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerPushBackV2Policy(Policy): +class SawyerPushBackV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_push_v2_policy.py b/metaworld/policies/sawyer_push_v3_policy.py similarity index 98% rename from metaworld/policies/sawyer_push_v2_policy.py rename to metaworld/policies/sawyer_push_v3_policy.py index 1ddfaac18..5ae88df6a 100644 --- a/metaworld/policies/sawyer_push_v2_policy.py +++ b/metaworld/policies/sawyer_push_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerPushV2Policy(Policy): +class SawyerPushV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_push_wall_v2_policy.py b/metaworld/policies/sawyer_push_wall_v3_policy.py similarity index 98% rename from metaworld/policies/sawyer_push_wall_v2_policy.py rename to metaworld/policies/sawyer_push_wall_v3_policy.py index 018496547..3d3b8c64f 100644 --- a/metaworld/policies/sawyer_push_wall_v2_policy.py +++ b/metaworld/policies/sawyer_push_wall_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerPushWallV2Policy(Policy): +class SawyerPushWallV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_reach_v2_policy.py b/metaworld/policies/sawyer_reach_v3_policy.py similarity index 96% rename from metaworld/policies/sawyer_reach_v2_policy.py rename to metaworld/policies/sawyer_reach_v3_policy.py index f37c3747c..7ebbd5d87 100644 --- a/metaworld/policies/sawyer_reach_v2_policy.py +++ b/metaworld/policies/sawyer_reach_v3_policy.py @@ -7,7 +7,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerReachV2Policy(Policy): +class SawyerReachV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_reach_wall_v2_policy.py b/metaworld/policies/sawyer_reach_wall_v3_policy.py similarity index 97% rename from metaworld/policies/sawyer_reach_wall_v2_policy.py rename to metaworld/policies/sawyer_reach_wall_v3_policy.py index f4042608b..61a343af9 100644 --- a/metaworld/policies/sawyer_reach_wall_v2_policy.py +++ b/metaworld/policies/sawyer_reach_wall_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, move -class SawyerReachWallV2Policy(Policy): +class SawyerReachWallV3Policy(Policy): @staticmethod def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: return { diff --git a/metaworld/policies/sawyer_shelf_place_v2_policy.py b/metaworld/policies/sawyer_shelf_place_v3_policy.py similarity index 98% rename from metaworld/policies/sawyer_shelf_place_v2_policy.py rename to metaworld/policies/sawyer_shelf_place_v3_policy.py index 1ef085776..2e2207e6a 100644 --- a/metaworld/policies/sawyer_shelf_place_v2_policy.py +++ b/metaworld/policies/sawyer_shelf_place_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerShelfPlaceV2Policy(Policy): +class SawyerShelfPlaceV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_soccer_v2_policy.py b/metaworld/policies/sawyer_soccer_v3_policy.py similarity index 98% rename from metaworld/policies/sawyer_soccer_v2_policy.py rename to metaworld/policies/sawyer_soccer_v3_policy.py index 33182bb2b..492ea83fb 100644 --- a/metaworld/policies/sawyer_soccer_v2_policy.py +++ b/metaworld/policies/sawyer_soccer_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerSoccerV2Policy(Policy): +class SawyerSoccerV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_stick_pull_v2_policy.py b/metaworld/policies/sawyer_stick_pull_v3_policy.py similarity index 98% rename from metaworld/policies/sawyer_stick_pull_v2_policy.py rename to metaworld/policies/sawyer_stick_pull_v3_policy.py index 99dd943b1..5da96d328 100644 --- a/metaworld/policies/sawyer_stick_pull_v2_policy.py +++ b/metaworld/policies/sawyer_stick_pull_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerStickPullV2Policy(Policy): +class SawyerStickPullV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_stick_push_v2_policy.py b/metaworld/policies/sawyer_stick_push_v3_policy.py similarity index 98% rename from metaworld/policies/sawyer_stick_push_v2_policy.py rename to metaworld/policies/sawyer_stick_push_v3_policy.py index 7cdcc790b..726ca0c9e 100644 --- a/metaworld/policies/sawyer_stick_push_v2_policy.py +++ b/metaworld/policies/sawyer_stick_push_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerStickPushV2Policy(Policy): +class SawyerStickPushV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_sweep_into_v2_policy.py b/metaworld/policies/sawyer_sweep_into_v3_policy.py similarity index 97% rename from metaworld/policies/sawyer_sweep_into_v2_policy.py rename to metaworld/policies/sawyer_sweep_into_v3_policy.py index da6b6572a..86b2eb2a5 100644 --- a/metaworld/policies/sawyer_sweep_into_v2_policy.py +++ b/metaworld/policies/sawyer_sweep_into_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerSweepIntoV2Policy(Policy): +class SawyerSweepIntoV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_sweep_v2_policy.py b/metaworld/policies/sawyer_sweep_v3_policy.py similarity index 98% rename from metaworld/policies/sawyer_sweep_v2_policy.py rename to metaworld/policies/sawyer_sweep_v3_policy.py index d319fa69c..1c1cb3c50 100644 --- a/metaworld/policies/sawyer_sweep_v2_policy.py +++ b/metaworld/policies/sawyer_sweep_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerSweepV2Policy(Policy): +class SawyerSweepV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_window_close_v2_policy.py b/metaworld/policies/sawyer_window_close_v3_policy.py similarity index 97% rename from metaworld/policies/sawyer_window_close_v2_policy.py rename to metaworld/policies/sawyer_window_close_v3_policy.py index 3f4e0c747..1f662680e 100644 --- a/metaworld/policies/sawyer_window_close_v2_policy.py +++ b/metaworld/policies/sawyer_window_close_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerWindowCloseV2Policy(Policy): +class SawyerWindowCloseV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/metaworld/policies/sawyer_window_open_v2_policy.py b/metaworld/policies/sawyer_window_open_v3_policy.py similarity index 97% rename from metaworld/policies/sawyer_window_open_v2_policy.py rename to metaworld/policies/sawyer_window_open_v3_policy.py index 03271a7c7..f4b435397 100644 --- a/metaworld/policies/sawyer_window_open_v2_policy.py +++ b/metaworld/policies/sawyer_window_open_v3_policy.py @@ -9,7 +9,7 @@ from metaworld.policies.policy import Policy, assert_fully_parsed, move -class SawyerWindowOpenV2Policy(Policy): +class SawyerWindowOpenV3Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs: npt.NDArray[np.float64]) -> dict[str, npt.NDArray[np.float64]]: diff --git a/scripts/keyboard_control.py b/scripts/keyboard_control.py index 1f25c6e44..c943561b7 100644 --- a/scripts/keyboard_control.py +++ b/scripts/keyboard_control.py @@ -10,7 +10,7 @@ import pygame # type: ignore from pygame.locals import KEYDOWN, QUIT # type: ignore -from metaworld.envs.v2 import SawyerPickPlaceEnvV2 +from metaworld.envs.V3 import SawyerPickPlaceEnvV3 pygame.init() screen = pygame.display.set_mode((400, 300)) @@ -35,7 +35,7 @@ } -env = SawyerPickPlaceEnvV2() +env = SawyerPickPlaceEnvV3() env._partially_observable = False env._freeze_rand_vec = False env._set_task_called = True diff --git a/scripts/plot_rewards_returns.ipynb b/scripts/plot_rewards_returns.ipynb index aaf0192af..0546dc8a6 100644 --- a/scripts/plot_rewards_returns.ipynb +++ b/scripts/plot_rewards_returns.ipynb @@ -102,7 +102,7 @@ "%reload_ext autoreload\n", "config = [\n", " # env name, action noise, path length\n", - " ['pick-place-v2', np.zeros(4), 200],\n", + " ['pick-place-V3', np.zeros(4), 200],\n", "]\n", "\n", "for env, noise, path_length in config:\n", diff --git a/scripts/plot_rewards_returns_noise_3D.ipynb b/scripts/plot_rewards_returns_noise_3D.ipynb index d126f1a7f..f3fdb7c8f 100644 --- a/scripts/plot_rewards_returns_noise_3D.ipynb +++ b/scripts/plot_rewards_returns_noise_3D.ipynb @@ -112,15 +112,15 @@ "source": [ "config = [\n", "# ['button-press-topdown-v1', 3],\n", - " ['pick-place-v2', 3],\n", - "# ['reach-v2', 3],\n", - "# ['window-open-v2', 3],\n", + " ['pick-place-V3', 3],\n", + "# ['reach-V3', 3],\n", + "# ['window-open-V3', 3],\n", "# ['sweep-v1', 3],\n", "# ['sweep-into-v1', 3],\n", - "# ['shelf-place-v2', 3],\n", - "# ['push-v2', 3],\n", - "# ['peg-insert-side-v2', 3],\n", - "# ['lever-pull-v2', 3],\n", + "# ['shelf-place-V3', 3],\n", + "# ['push-V3', 3],\n", + "# ['peg-insert-side-V3', 3],\n", + "# ['lever-pull-V3', 3],\n", "]\n", "\n", "for env, axis in config:\n", diff --git a/scripts/policy_testing.py b/scripts/policy_testing.py index 2426df06c..f1f4d5f88 100644 --- a/scripts/policy_testing.py +++ b/scripts/policy_testing.py @@ -4,14 +4,14 @@ import numpy as np import metaworld -from metaworld.policies.sawyer_door_lock_v2_policy import ( - SawyerDoorLockV2Policy as policy, +from metaworld.policies.sawyer_door_lock_v3_policy import ( + SawyerDoorLockV3Policy as policy, ) np.set_printoptions(suppress=True) seed = 42 -env_name = "door-lock-v2" +env_name = "door-lock-V3" random.seed(seed) ml1 = metaworld.MT50(seed=seed) diff --git a/scripts/profile_memory_usage.py b/scripts/profile_memory_usage.py index 5993474bb..9f4f0a928 100755 --- a/scripts/profile_memory_usage.py +++ b/scripts/profile_memory_usage.py @@ -2,7 +2,7 @@ """Test script for profiling average memory footprint.""" import memory_profiler -from metaworld.envs.env_dict import ALL_V2_ENVIRONMENTS +from metaworld.envs.env_dict import ALL_V3_ENVIRONMENTS from tests.helpers import step_env @@ -22,7 +22,7 @@ def build_and_step_all(classes): def profile_hard_mode_indepedent(): profile = {} - for env_cls in ALL_V2_ENVIRONMENTS: + for env_cls in ALL_V3_ENVIRONMENTS: target = (build_and_step, [env_cls], {}) memory_usage = memory_profiler.memory_usage(target) profile[env_cls] = max(memory_usage) @@ -31,7 +31,7 @@ def profile_hard_mode_indepedent(): def profile_hard_mode_shared(): - target = (build_and_step_all, [ALL_V2_ENVIRONMENTS], {}) + target = (build_and_step_all, [ALL_V3_ENVIRONMENTS], {}) usage = memory_profiler.memory_usage(target) return max(usage) @@ -54,7 +54,7 @@ def profile_hard_mode_shared(): print("--------- Shared memory footprint ---------") max_usage = profile_hard_mode_shared() - mean_shared = max_usage / len(ALL_V2_ENVIRONMENTS) + mean_shared = max_usage / len(ALL_V3_ENVIRONMENTS) print( - f"Mean memory footprint (n = {len(ALL_V2_ENVIRONMENTS)}): {mean_shared:.1f} MB" + f"Mean memory footprint (n = {len(ALL_V3_ENVIRONMENTS)}): {mean_shared:.1f} MB" ) diff --git a/scripts/scripted_policy_movies.ipynb b/scripts/scripted_policy_movies.ipynb index 917b3a2cd..a10950627 100644 --- a/scripts/scripted_policy_movies.ipynb +++ b/scripts/scripted_policy_movies.ipynb @@ -8,7 +8,7 @@ "import os\n", "import functools\n", "\n", - "import cv2\n", + "import cV3\n", "import numpy as np\n", "\n", "from tests.metaworld.envs.mujoco.sawyer_xyz.test_scripted_policies import ALL_ENVS, test_cases_latest_nonoise\n" @@ -43,9 +43,9 @@ "def writer_for(tag, fps, res):\n", " if not os.path.exists('movies'):\n", " os.mkdir('movies')\n", - " return cv2.VideoWriter(\n", + " return cV3.VideoWriter(\n", " f'movies/{tag}.avi',\n", - " cv2.VideoWriter_fourcc('M','J','P','G'),\n", + " cV3.VideoWriter_fourcc('M','J','P','G'),\n", " fps,\n", " res\n", " )" @@ -68,59 +68,59 @@ "\n", "config = [\n", " # env, action noise pct, cycles, quit on success\n", - " ('assembly-v2', np.zeros(4), 3, True),\n", - " ('basketball-v2', np.zeros(4), 3, True),\n", - " ('bin-picking-v2', np.zeros(4), 3, True),\n", - " ('box-close-v2', np.zeros(4), 3, True),\n", - " ('button-press-topdown-v2', np.zeros(4), 3, True),\n", - " ('button-press-topdown-wall-v2', np.zeros(4), 3, True),\n", - " ('button-press-v2', np.zeros(4), 3, True),\n", - " ('button-press-wall-v2', np.zeros(4), 3, True),\n", - " ('coffee-button-v2', np.zeros(4), 3, True),\n", - " ('coffee-pull-v2', np.zeros(4), 3, True),\n", - " ('coffee-push-v2', np.zeros(4), 3, True),\n", - " ('dial-turn-v2', np.zeros(4), 3, True),\n", - " ('disassemble-v2', np.zeros(4), 3, True),\n", - " ('door-close-v2', np.zeros(4), 3, True),\n", - " ('door-lock-v2', np.zeros(4), 3, True),\n", - " ('door-open-v2', np.zeros(4), 3, True),\n", - " ('door-unlock-v2', np.zeros(4), 3, True),\n", - " ('hand-insert-v2', np.zeros(4), 3, True),\n", - " ('drawer-close-v2', np.zeros(4), 3, True),\n", - " ('drawer-open-v2', np.zeros(4), 3, True),\n", - " ('faucet-open-v2', np.zeros(4), 3, True),\n", - " ('faucet-close-v2', np.zeros(4), 3, True),\n", - " ('hammer-v2', np.zeros(4), 3, True),\n", - " ('handle-press-side-v2', np.zeros(4), 3, True),\n", - " ('handle-press-v2', np.zeros(4), 3, True),\n", - " ('handle-pull-side-v2', np.zeros(4), 3, True),\n", - " ('handle-pull-v2', np.zeros(4), 3, True),\n", - " ('lever-pull-v2', np.zeros(4), 3, True),\n", - " ('peg-insert-side-v2', np.zeros(4), 3, True),\n", - " ('pick-place-wall-v2', np.zeros(4), 3, True),\n", - " ('pick-out-of-hole-v2', np.zeros(4), 3, True),\n", - " ('reach-v2', np.zeros(4), 3, True),\n", - " ('push-back-v2', np.zeros(4), 3, True),\n", - " ('push-v2', np.zeros(4), 3, True),\n", - " ('pick-place-v2', np.zeros(4), 3, True),\n", - " ('plate-slide-v2', np.zeros(4), 3, True),\n", - " ('plate-slide-side-v2', np.zeros(4), 3, True),\n", - " ('plate-slide-back-v2', np.zeros(4), 3, True),\n", - " ('plate-slide-back-side-v2', np.zeros(4), 3, True),\n", - " ('peg-insert-side-v2', np.zeros(4), 3, True),\n", - " ('peg-unplug-side-v2', np.zeros(4), 3, True),\n", - " ('soccer-v2', np.zeros(4), 3, True),\n", - " ('stick-push-v2', np.zeros(4), 3, True),\n", - " ('stick-pull-v2', np.zeros(4), 3, True),\n", - " ('push-wall-v2', np.zeros(4), 3, True),\n", - " ('push-v2', np.zeros(4), 3, True),\n", - " ('reach-wall-v2', np.zeros(4), 3, True),\n", - " ('reach-v2', np.zeros(4), 3, True),\n", - " ('shelf-place-v2', np.zeros(4), 3, True),\n", - " ('sweep-into-v2', np.zeros(4), 3, True),\n", - " ('sweep-v2', np.zeros(4), 3, True),\n", - " ('window-open-v2', np.zeros(4), 3, True),\n", - " ('window-close-v2', np.zeros(4), 3, True),\n", + " ('assembly-V3', np.zeros(4), 3, True),\n", + " ('basketball-V3', np.zeros(4), 3, True),\n", + " ('bin-picking-V3', np.zeros(4), 3, True),\n", + " ('box-close-V3', np.zeros(4), 3, True),\n", + " ('button-press-topdown-V3', np.zeros(4), 3, True),\n", + " ('button-press-topdown-wall-V3', np.zeros(4), 3, True),\n", + " ('button-press-V3', np.zeros(4), 3, True),\n", + " ('button-press-wall-V3', np.zeros(4), 3, True),\n", + " ('coffee-button-V3', np.zeros(4), 3, True),\n", + " ('coffee-pull-V3', np.zeros(4), 3, True),\n", + " ('coffee-push-V3', np.zeros(4), 3, True),\n", + " ('dial-turn-V3', np.zeros(4), 3, True),\n", + " ('disassemble-V3', np.zeros(4), 3, True),\n", + " ('door-close-V3', np.zeros(4), 3, True),\n", + " ('door-lock-V3', np.zeros(4), 3, True),\n", + " ('door-open-V3', np.zeros(4), 3, True),\n", + " ('door-unlock-V3', np.zeros(4), 3, True),\n", + " ('hand-insert-V3', np.zeros(4), 3, True),\n", + " ('drawer-close-V3', np.zeros(4), 3, True),\n", + " ('drawer-open-V3', np.zeros(4), 3, True),\n", + " ('faucet-open-V3', np.zeros(4), 3, True),\n", + " ('faucet-close-V3', np.zeros(4), 3, True),\n", + " ('hammer-V3', np.zeros(4), 3, True),\n", + " ('handle-press-side-V3', np.zeros(4), 3, True),\n", + " ('handle-press-V3', np.zeros(4), 3, True),\n", + " ('handle-pull-side-V3', np.zeros(4), 3, True),\n", + " ('handle-pull-V3', np.zeros(4), 3, True),\n", + " ('lever-pull-V3', np.zeros(4), 3, True),\n", + " ('peg-insert-side-V3', np.zeros(4), 3, True),\n", + " ('pick-place-wall-V3', np.zeros(4), 3, True),\n", + " ('pick-out-of-hole-V3', np.zeros(4), 3, True),\n", + " ('reach-V3', np.zeros(4), 3, True),\n", + " ('push-back-V3', np.zeros(4), 3, True),\n", + " ('push-V3', np.zeros(4), 3, True),\n", + " ('pick-place-V3', np.zeros(4), 3, True),\n", + " ('plate-slide-V3', np.zeros(4), 3, True),\n", + " ('plate-slide-side-V3', np.zeros(4), 3, True),\n", + " ('plate-slide-back-V3', np.zeros(4), 3, True),\n", + " ('plate-slide-back-side-V3', np.zeros(4), 3, True),\n", + " ('peg-insert-side-V3', np.zeros(4), 3, True),\n", + " ('peg-unplug-side-V3', np.zeros(4), 3, True),\n", + " ('soccer-V3', np.zeros(4), 3, True),\n", + " ('stick-push-V3', np.zeros(4), 3, True),\n", + " ('stick-pull-V3', np.zeros(4), 3, True),\n", + " ('push-wall-V3', np.zeros(4), 3, True),\n", + " ('push-V3', np.zeros(4), 3, True),\n", + " ('reach-wall-V3', np.zeros(4), 3, True),\n", + " ('reach-V3', np.zeros(4), 3, True),\n", + " ('shelf-place-V3', np.zeros(4), 3, True),\n", + " ('sweep-into-V3', np.zeros(4), 3, True),\n", + " ('sweep-V3', np.zeros(4), 3, True),\n", + " ('window-open-V3', np.zeros(4), 3, True),\n", + " ('window-close-V3', np.zeros(4), 3, True),\n", "]\n", "\n", "for env, noise, cycles, quit_on_success in config:\n", @@ -135,7 +135,7 @@ " writer = writer_for(tag, env.metadata['video.frames_per_second'], resolution)\n", " for _ in range(cycles):\n", " for r, done, info, img in trajectory_generator(env, policy, noise, resolution, camera):\n", - " if flip: img = cv2.rotate(img, cv2.ROTATE_180)\n", + " if flip: img = cV3.rotate(img, cV3.ROTATE_180)\n", " writer.write(img)\n", " if quit_on_success and info['success']:\n", " break\n", diff --git a/tests/integration/test_memory_usage.py b/tests/integration/test_memory_usage.py index 19a0f4f72..3f74e9cb9 100644 --- a/tests/integration/test_memory_usage.py +++ b/tests/integration/test_memory_usage.py @@ -1,7 +1,7 @@ import memory_profiler import pytest -from metaworld.env_dict import ALL_V2_ENVIRONMENTS +from metaworld.env_dict import ALL_V3_ENVIRONMENTS from tests.helpers import step_env @@ -21,7 +21,7 @@ def build_and_step_all(classes): @pytest.fixture(scope="module") def mt50_usage(): profile = {} - for env_cls in ALL_V2_ENVIRONMENTS.values(): + for env_cls in ALL_V3_ENVIRONMENTS.values(): target = (build_and_step, [env_cls], {}) memory_usage = memory_profiler.memory_usage(target) profile[env_cls] = max(memory_usage) @@ -30,7 +30,7 @@ def mt50_usage(): @pytest.mark.skip -@pytest.mark.parametrize("env_cls", ALL_V2_ENVIRONMENTS.values()) +@pytest.mark.parametrize("env_cls", ALL_V3_ENVIRONMENTS.values()) def test_max_memory_usage(env_cls, mt50_usage): # No env should use more than 250MB # @@ -43,14 +43,14 @@ def test_max_memory_usage(env_cls, mt50_usage): @pytest.mark.skip def test_avg_memory_usage(): # average usage no greater than 60MB/env - target = (build_and_step_all, [ALL_V2_ENVIRONMENTS.values()], {}) + target = (build_and_step_all, [ALL_V3_ENVIRONMENTS.values()], {}) usage = memory_profiler.memory_usage(target) - average = max(usage) / len(ALL_V2_ENVIRONMENTS) + average = max(usage) / len(ALL_V3_ENVIRONMENTS) assert average < 60 @pytest.mark.skip def test_from_task_memory_usage(): - target = (ALL_V2_ENVIRONMENTS["reach-v1"], (), {}) + target = (ALL_V3_ENVIRONMENTS["reach-v1"], (), {}) usage = memory_profiler.memory_usage(target) assert max(usage) < 250 diff --git a/tests/integration/test_new_api.py b/tests/integration/test_new_api.py index d8e836dba..55c12db42 100644 --- a/tests/integration/test_new_api.py +++ b/tests/integration/test_new_api.py @@ -251,15 +251,15 @@ def check_target_poss_unique(env_instances, env_rand_vecs): """Verify that all the state_goals are unique for the different rand_vecs that are sampled. Note: The following envs randomize object initial position but not state_goal. - ['hammer-v2', 'sweep-into-v2', 'bin-picking-v2', 'basketball-v2'] + ['hammer-V3', 'sweep-into-V3', 'bin-picking-V3', 'basketball-V3'] """ for env_name, rand_vecs in env_rand_vecs.items(): if env_name in { - "hammer-v2", - "sweep-into-v2", - "bin-picking-v2", - "basketball-v2", + "hammer-V3", + "sweep-into-V3", + "bin-picking-V3", + "basketball-V3", }: continue env = env_instances[env_name] @@ -289,13 +289,13 @@ def helper_neq(env, env_2): assert not (rand_vec_1 == rand_vec_2).all() # testing MT1 - mt1_1 = metaworld.MT1("sweep-into-v2", seed=10) - mt1_2 = metaworld.MT1("sweep-into-v2", seed=10) + mt1_1 = metaworld.MT1("sweep-into-V3", seed=10) + mt1_2 = metaworld.MT1("sweep-into-V3", seed=10) helper(mt1_1, mt1_2) # testing ML1 - ml1_1 = metaworld.ML1("sweep-into-v2", seed=10) - ml1_2 = metaworld.ML1("sweep-into-v2", seed=10) + ml1_1 = metaworld.ML1("sweep-into-V3", seed=10) + ml1_2 = metaworld.ML1("sweep-into-V3", seed=10) helper(ml1_1, ml1_2) # testing MT10 diff --git a/tests/integration/test_single_goal_envs.py b/tests/integration/test_single_goal_envs.py index 9d9ee8fd9..d155ed3e9 100644 --- a/tests/integration/test_single_goal_envs.py +++ b/tests/integration/test_single_goal_envs.py @@ -1,19 +1,19 @@ import numpy as np from metaworld.env_dict import ( - ALL_V2_ENVIRONMENTS_GOAL_HIDDEN, - ALL_V2_ENVIRONMENTS_GOAL_OBSERVABLE, + ALL_V3_ENVIRONMENTS_GOAL_HIDDEN, + ALL_V3_ENVIRONMENTS_GOAL_OBSERVABLE, ) from tests.helpers import step_env def test_hidden_goal_envs(): - for env_key, env_cls in ALL_V2_ENVIRONMENTS_GOAL_HIDDEN.items(): + for env_key, env_cls in ALL_V3_ENVIRONMENTS_GOAL_HIDDEN.items(): assert "goal-hidden" in env_key assert "GoalHidden" in env_cls.__name__ state_before = np.random.get_state() env = env_cls(seed=5) - env2 = env_cls(seed=5) + enV3 = env_cls(seed=5) step_env(env, max_path_length=3, iterations=3, render=False) first_target = env._target_pos @@ -22,8 +22,8 @@ def test_hidden_goal_envs(): assert (first_target == second_target).all() env.reset() - env2.reset() - assert (env._target_pos == env2._target_pos).all() + enV3.reset() + assert (env._target_pos == enV3._target_pos).all() state_after = np.random.get_state() for idx, (state_before_idx, state_after_idx) in enumerate( zip(state_before, state_after) @@ -35,12 +35,12 @@ def test_hidden_goal_envs(): def test_observable_goal_envs(): - for env_key, env_cls in ALL_V2_ENVIRONMENTS_GOAL_OBSERVABLE.items(): + for env_key, env_cls in ALL_V3_ENVIRONMENTS_GOAL_OBSERVABLE.items(): assert "goal-observable" in env_key assert "GoalObservable" in env_cls.__name__ state_before = np.random.get_state() env = env_cls(seed=10) - env2 = env_cls(seed=10) + enV3 = env_cls(seed=10) step_env(env, max_path_length=3, iterations=3, render=False) first_target = env._target_pos @@ -49,8 +49,8 @@ def test_observable_goal_envs(): assert (first_target == second_target).all() env.reset() - env2.reset() - assert (env._target_pos == env2._target_pos).all() + enV3.reset() + assert (env._target_pos == enV3._target_pos).all() state_after = np.random.get_state() for idx, (state_before_idx, state_after_idx) in enumerate( zip(state_before, state_after) @@ -62,21 +62,21 @@ def test_observable_goal_envs(): def test_seeding_observable(): - door_open_goal_observable_cls = ALL_V2_ENVIRONMENTS_GOAL_OBSERVABLE[ - "door-open-v2-goal-observable" + door_open_goal_observable_cls = ALL_V3_ENVIRONMENTS_GOAL_OBSERVABLE[ + "door-open-V3-goal-observable" ] env1 = door_open_goal_observable_cls(seed=5) - env2 = door_open_goal_observable_cls(seed=5) + enV3 = door_open_goal_observable_cls(seed=5) env1.reset() # Reset environment - env2.reset() + enV3.reset() a1 = env1.action_space.sample() # Sample an action - a2 = env2.action_space.sample() + a2 = enV3.action_space.sample() next_obs1, _, _, _, _ = env1.step( a1 ) # Step the environoment with the sampled random action - next_obs2, _, _, _, _ = env2.step(a2) + next_obs2, _, _, _, _ = enV3.step(a2) assert ( next_obs1[-3:] == next_obs2[-3:] ).all() # 2 envs initialized with the same seed will have the same goal @@ -105,23 +105,23 @@ def test_seeding_observable(): def test_seeding_hidden(): - door_open_goal_hidden_cls = ALL_V2_ENVIRONMENTS_GOAL_HIDDEN[ - "door-open-v2-goal-hidden" + door_open_goal_hidden_cls = ALL_V3_ENVIRONMENTS_GOAL_HIDDEN[ + "door-open-V3-goal-hidden" ] env1 = door_open_goal_hidden_cls(seed=5) - env2 = door_open_goal_hidden_cls(seed=5) + enV3 = door_open_goal_hidden_cls(seed=5) env1.reset() # Reset environment - env2.reset() + enV3.reset() a1 = env1.action_space.sample() # Sample an action - a2 = env2.action_space.sample() + a2 = enV3.action_space.sample() next_obs1, _, _, _, _ = env1.step( a1 ) # Step the environoment with the sampled random action - next_obs2, _, _, _, _ = env2.step(a2) + next_obs2, _, _, _, _ = enV3.step(a2) assert ( - env1._target_pos == env2._target_pos + env1._target_pos == enV3._target_pos ).all() # 2 envs initialized with the same seed will have the same goal assert (next_obs2[-3:] == np.zeros(3)).all() and ( next_obs1[-3] == np.zeros(3) diff --git a/tests/metaworld/envs/mujoco/sawyer_xyz/test_obs_space_hand.py b/tests/metaworld/envs/mujoco/sawyer_xyz/test_obs_space_hand.py index 126d54089..31999db68 100644 --- a/tests/metaworld/envs/mujoco/sawyer_xyz/test_obs_space_hand.py +++ b/tests/metaworld/envs/mujoco/sawyer_xyz/test_obs_space_hand.py @@ -1,7 +1,7 @@ import numpy as np import pytest -from metaworld.env_dict import ALL_V2_ENVIRONMENTS +from metaworld.env_dict import ALL_V3_ENVIRONMENTS from metaworld.policies.action import Action from metaworld.policies.policy import Policy, move from metaworld.sawyer_xyz_env import SawyerXYZEnv @@ -43,7 +43,7 @@ def sample_spherical(num_points, radius=1.0): @pytest.mark.parametrize("target", sample_spherical(100, 10.0)) def test_reaching_limit(target): - env = ALL_V2_ENVIRONMENTS["reach-v2"]() + env = ALL_V3_ENVIRONMENTS["reach-V3"]() env._partially_observable = False env._freeze_rand_vec = False env._set_task_called = True diff --git a/tests/metaworld/envs/mujoco/sawyer_xyz/test_scripted_policies.py b/tests/metaworld/envs/mujoco/sawyer_xyz/test_scripted_policies.py index 76b2c4056..217a2656c 100644 --- a/tests/metaworld/envs/mujoco/sawyer_xyz/test_scripted_policies.py +++ b/tests/metaworld/envs/mujoco/sawyer_xyz/test_scripted_policies.py @@ -2,110 +2,110 @@ from metaworld import MT1 from metaworld.policies import ( - SawyerAssemblyV2Policy, - SawyerBasketballV2Policy, - SawyerBinPickingV2Policy, - SawyerBoxCloseV2Policy, - SawyerButtonPressTopdownV2Policy, - SawyerButtonPressTopdownWallV2Policy, - SawyerButtonPressV2Policy, - SawyerButtonPressWallV2Policy, - SawyerCoffeeButtonV2Policy, - SawyerCoffeePullV2Policy, - SawyerCoffeePushV2Policy, - SawyerDialTurnV2Policy, - SawyerDisassembleV2Policy, - SawyerDoorCloseV2Policy, - SawyerDoorLockV2Policy, - SawyerDoorOpenV2Policy, - SawyerDoorUnlockV2Policy, - SawyerDrawerCloseV2Policy, - SawyerDrawerOpenV2Policy, - SawyerFaucetCloseV2Policy, - SawyerFaucetOpenV2Policy, - SawyerHammerV2Policy, - SawyerHandInsertV2Policy, - SawyerHandlePressSideV2Policy, - SawyerHandlePressV2Policy, - SawyerHandlePullSideV2Policy, - SawyerHandlePullV2Policy, - SawyerLeverPullV2Policy, - SawyerPegInsertionSideV2Policy, - SawyerPegUnplugSideV2Policy, - SawyerPickOutOfHoleV2Policy, - SawyerPickPlaceV2Policy, - SawyerPickPlaceWallV2Policy, - SawyerPlateSlideBackSideV2Policy, - SawyerPlateSlideBackV2Policy, - SawyerPlateSlideSideV2Policy, - SawyerPlateSlideV2Policy, - SawyerPushBackV2Policy, - SawyerPushV2Policy, - SawyerPushWallV2Policy, - SawyerReachV2Policy, - SawyerReachWallV2Policy, - SawyerShelfPlaceV2Policy, - SawyerSoccerV2Policy, - SawyerStickPullV2Policy, - SawyerStickPushV2Policy, - SawyerSweepIntoV2Policy, - SawyerSweepV2Policy, - SawyerWindowCloseV2Policy, - SawyerWindowOpenV2Policy, + SawyerAssemblyV3Policy, + SawyerBasketballV3Policy, + SawyerBinPickingV3Policy, + SawyerBoxCloseV3Policy, + SawyerButtonPressTopdownV3Policy, + SawyerButtonPressTopdownWallV3Policy, + SawyerButtonPressV3Policy, + SawyerButtonPressWallV3Policy, + SawyerCoffeeButtonV3Policy, + SawyerCoffeePullV3Policy, + SawyerCoffeePushV3Policy, + SawyerDialTurnV3Policy, + SawyerDisassembleV3Policy, + SawyerDoorCloseV3Policy, + SawyerDoorLockV3Policy, + SawyerDoorOpenV3Policy, + SawyerDoorUnlockV3Policy, + SawyerDrawerCloseV3Policy, + SawyerDrawerOpenV3Policy, + SawyerFaucetCloseV3Policy, + SawyerFaucetOpenV3Policy, + SawyerHammerV3Policy, + SawyerHandInsertV3Policy, + SawyerHandlePressSideV3Policy, + SawyerHandlePressV3Policy, + SawyerHandlePullSideV3Policy, + SawyerHandlePullV3Policy, + SawyerLeverPullV3Policy, + SawyerPegInsertionSideV3Policy, + SawyerPegUnplugSideV3Policy, + SawyerPickOutOfHoleV3Policy, + SawyerPickPlaceV3Policy, + SawyerPickPlaceWallV3Policy, + SawyerPlateSlideBackSideV3Policy, + SawyerPlateSlideBackV3Policy, + SawyerPlateSlideSideV3Policy, + SawyerPlateSlideV3Policy, + SawyerPushBackV3Policy, + SawyerPushV3Policy, + SawyerPushWallV3Policy, + SawyerReachV3Policy, + SawyerReachWallV3Policy, + SawyerShelfPlaceV3Policy, + SawyerSoccerV3Policy, + SawyerStickPullV3Policy, + SawyerStickPushV3Policy, + SawyerSweepIntoV3Policy, + SawyerSweepV3Policy, + SawyerWindowCloseV3Policy, + SawyerWindowOpenV3Policy, ) policies = dict( { - "assembly-v2": SawyerAssemblyV2Policy, - "basketball-v2": SawyerBasketballV2Policy, - "bin-picking-v2": SawyerBinPickingV2Policy, - "box-close-v2": SawyerBoxCloseV2Policy, - "button-press-topdown-v2": SawyerButtonPressTopdownV2Policy, - "button-press-topdown-wall-v2": SawyerButtonPressTopdownWallV2Policy, - "button-press-v2": SawyerButtonPressV2Policy, - "button-press-wall-v2": SawyerButtonPressWallV2Policy, - "coffee-button-v2": SawyerCoffeeButtonV2Policy, - "coffee-pull-v2": SawyerCoffeePullV2Policy, - "coffee-push-v2": SawyerCoffeePushV2Policy, - "dial-turn-v2": SawyerDialTurnV2Policy, - "disassemble-v2": SawyerDisassembleV2Policy, - "door-close-v2": SawyerDoorCloseV2Policy, - "door-lock-v2": SawyerDoorLockV2Policy, - "door-open-v2": SawyerDoorOpenV2Policy, - "door-unlock-v2": SawyerDoorUnlockV2Policy, - "drawer-close-v2": SawyerDrawerCloseV2Policy, - "drawer-open-v2": SawyerDrawerOpenV2Policy, - "faucet-close-v2": SawyerFaucetCloseV2Policy, - "faucet-open-v2": SawyerFaucetOpenV2Policy, - "hammer-v2": SawyerHammerV2Policy, - "hand-insert-v2": SawyerHandInsertV2Policy, - "handle-press-side-v2": SawyerHandlePressSideV2Policy, - "handle-press-v2": SawyerHandlePressV2Policy, - "handle-pull-v2": SawyerHandlePullV2Policy, - "handle-pull-side-v2": SawyerHandlePullSideV2Policy, - "peg-insert-side-v2": SawyerPegInsertionSideV2Policy, - "lever-pull-v2": SawyerLeverPullV2Policy, - "peg-unplug-side-v2": SawyerPegUnplugSideV2Policy, - "pick-out-of-hole-v2": SawyerPickOutOfHoleV2Policy, - "pick-place-v2": SawyerPickPlaceV2Policy, - "pick-place-wall-v2": SawyerPickPlaceWallV2Policy, - "plate-slide-back-side-v2": SawyerPlateSlideBackSideV2Policy, - "plate-slide-back-v2": SawyerPlateSlideBackV2Policy, - "plate-slide-side-v2": SawyerPlateSlideSideV2Policy, - "plate-slide-v2": SawyerPlateSlideV2Policy, - "reach-v2": SawyerReachV2Policy, - "reach-wall-v2": SawyerReachWallV2Policy, - "push-back-v2": SawyerPushBackV2Policy, - "push-v2": SawyerPushV2Policy, - "push-wall-v2": SawyerPushWallV2Policy, - "shelf-place-v2": SawyerShelfPlaceV2Policy, - "soccer-v2": SawyerSoccerV2Policy, - "stick-pull-v2": SawyerStickPullV2Policy, - "stick-push-v2": SawyerStickPushV2Policy, - "sweep-into-v2": SawyerSweepIntoV2Policy, - "sweep-v2": SawyerSweepV2Policy, - "window-close-v2": SawyerWindowCloseV2Policy, - "window-open-v2": SawyerWindowOpenV2Policy, + "assembly-V3": SawyerAssemblyV3Policy, + "basketball-V3": SawyerBasketballV3Policy, + "bin-picking-V3": SawyerBinPickingV3Policy, + "box-close-V3": SawyerBoxCloseV3Policy, + "button-press-topdown-V3": SawyerButtonPressTopdownV3Policy, + "button-press-topdown-wall-V3": SawyerButtonPressTopdownWallV3Policy, + "button-press-V3": SawyerButtonPressV3Policy, + "button-press-wall-V3": SawyerButtonPressWallV3Policy, + "coffee-button-V3": SawyerCoffeeButtonV3Policy, + "coffee-pull-V3": SawyerCoffeePullV3Policy, + "coffee-push-V3": SawyerCoffeePushV3Policy, + "dial-turn-V3": SawyerDialTurnV3Policy, + "disassemble-V3": SawyerDisassembleV3Policy, + "door-close-V3": SawyerDoorCloseV3Policy, + "door-lock-V3": SawyerDoorLockV3Policy, + "door-open-V3": SawyerDoorOpenV3Policy, + "door-unlock-V3": SawyerDoorUnlockV3Policy, + "drawer-close-V3": SawyerDrawerCloseV3Policy, + "drawer-open-V3": SawyerDrawerOpenV3Policy, + "faucet-close-V3": SawyerFaucetCloseV3Policy, + "faucet-open-V3": SawyerFaucetOpenV3Policy, + "hammer-V3": SawyerHammerV3Policy, + "hand-insert-V3": SawyerHandInsertV3Policy, + "handle-press-side-V3": SawyerHandlePressSideV3Policy, + "handle-press-V3": SawyerHandlePressV3Policy, + "handle-pull-V3": SawyerHandlePullV3Policy, + "handle-pull-side-V3": SawyerHandlePullSideV3Policy, + "peg-insert-side-V3": SawyerPegInsertionSideV3Policy, + "lever-pull-V3": SawyerLeverPullV3Policy, + "peg-unplug-side-V3": SawyerPegUnplugSideV3Policy, + "pick-out-of-hole-V3": SawyerPickOutOfHoleV3Policy, + "pick-place-V3": SawyerPickPlaceV3Policy, + "pick-place-wall-V3": SawyerPickPlaceWallV3Policy, + "plate-slide-back-side-V3": SawyerPlateSlideBackSideV3Policy, + "plate-slide-back-V3": SawyerPlateSlideBackV3Policy, + "plate-slide-side-V3": SawyerPlateSlideSideV3Policy, + "plate-slide-V3": SawyerPlateSlideV3Policy, + "reach-V3": SawyerReachV3Policy, + "reach-wall-V3": SawyerReachWallV3Policy, + "push-back-V3": SawyerPushBackV3Policy, + "push-V3": SawyerPushV3Policy, + "push-wall-V3": SawyerPushWallV3Policy, + "shelf-place-V3": SawyerShelfPlaceV3Policy, + "soccer-V3": SawyerSoccerV3Policy, + "stick-pull-V3": SawyerStickPullV3Policy, + "stick-push-V3": SawyerStickPushV3Policy, + "sweep-into-V3": SawyerSweepIntoV3Policy, + "sweep-V3": SawyerSweepV3Policy, + "window-close-V3": SawyerWindowCloseV3Policy, + "window-open-V3": SawyerWindowOpenV3Policy, } ) diff --git a/tests/metaworld/envs/mujoco/sawyer_xyz/test_seeded_rand_vec.py b/tests/metaworld/envs/mujoco/sawyer_xyz/test_seeded_rand_vec.py index 0cb711d02..48c679143 100644 --- a/tests/metaworld/envs/mujoco/sawyer_xyz/test_seeded_rand_vec.py +++ b/tests/metaworld/envs/mujoco/sawyer_xyz/test_seeded_rand_vec.py @@ -3,24 +3,24 @@ import numpy as np import pytest -from metaworld.env_dict import ALL_V2_ENVIRONMENTS_GOAL_OBSERVABLE +from metaworld.env_dict import ALL_V3_ENVIRONMENTS_GOAL_OBSERVABLE -@pytest.mark.parametrize("env_name", sorted(ALL_V2_ENVIRONMENTS_GOAL_OBSERVABLE.keys())) +@pytest.mark.parametrize("env_name", sorted(ALL_V3_ENVIRONMENTS_GOAL_OBSERVABLE.keys())) def test_observations_match(env_name): seed = random.randrange(1000) - env1 = ALL_V2_ENVIRONMENTS_GOAL_OBSERVABLE[env_name](seed=seed) + env1 = ALL_V3_ENVIRONMENTS_GOAL_OBSERVABLE[env_name](seed=seed) env1.seeded_rand_vec = True - env2 = ALL_V2_ENVIRONMENTS_GOAL_OBSERVABLE[env_name](seed=seed) - env2.seeded_rand_vec = True + enV3 = ALL_V3_ENVIRONMENTS_GOAL_OBSERVABLE[env_name](seed=seed) + enV3.seeded_rand_vec = True - (obs1, _), (obs2, _) = env1.reset(), env2.reset() + (obs1, _), (obs2, _) = env1.reset(), enV3.reset() assert (obs1 == obs2).all() for i in range(env1.max_path_length): a = np.random.uniform(low=-1, high=-1, size=4) obs1, r1, done1, _, _ = env1.step(a) - obs2, r2, done2, _, _ = env2.step(a) + obs2, r2, done2, _, _ = enV3.step(a) assert (obs1 == obs2).all() assert r1 == r2 assert not done1