From 0629d1260c6d611b2917f02776fd00f6208a2578 Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Sun, 17 Sep 2023 17:29:26 +0200 Subject: [PATCH] Ensure mp_config defined for all envs, even if just using defaults. --- fancy_gym/dmc/suite/reacher/mp_wrapper.py | 2 ++ fancy_gym/envs/mujoco/half_cheetah_jump/mp_wrapper.py | 6 ++++++ fancy_gym/envs/mujoco/hopper_jump/mp_wrapper.py | 5 +++++ fancy_gym/envs/mujoco/hopper_throw/mp_wrapper.py | 5 +++++ fancy_gym/envs/mujoco/walker_2d_jump/mp_wrapper.py | 5 +++++ 5 files changed, 23 insertions(+) diff --git a/fancy_gym/dmc/suite/reacher/mp_wrapper.py b/fancy_gym/dmc/suite/reacher/mp_wrapper.py index fe40d26..d713fb6 100644 --- a/fancy_gym/dmc/suite/reacher/mp_wrapper.py +++ b/fancy_gym/dmc/suite/reacher/mp_wrapper.py @@ -10,6 +10,7 @@ class MPWrapper(RawInterfaceWrapper): 'ProMP': { 'controller_kwargs': { 'p_gains': 50.0, + 'd_gains': 1.0, }, 'trajectory_generator_kwargs': { 'weights_scale': 0.2, @@ -18,6 +19,7 @@ class MPWrapper(RawInterfaceWrapper): 'DMP': { 'controller_kwargs': { 'p_gains': 50.0, + 'd_gains': 1.0, }, 'phase_generator': { 'alpha_phase': 2, diff --git a/fancy_gym/envs/mujoco/half_cheetah_jump/mp_wrapper.py b/fancy_gym/envs/mujoco/half_cheetah_jump/mp_wrapper.py index 11b169b..f5f7634 100644 --- a/fancy_gym/envs/mujoco/half_cheetah_jump/mp_wrapper.py +++ b/fancy_gym/envs/mujoco/half_cheetah_jump/mp_wrapper.py @@ -6,6 +6,12 @@ from fancy_gym.black_box.raw_interface_wrapper import RawInterfaceWrapper class MPWrapper(RawInterfaceWrapper): + mp_config = { + 'ProMP': {}, + 'DMP': {}, + 'ProDMP': {}, + } + @property def context_mask(self) -> np.ndarray: return np.hstack([ diff --git a/fancy_gym/envs/mujoco/hopper_jump/mp_wrapper.py b/fancy_gym/envs/mujoco/hopper_jump/mp_wrapper.py index ed95b3d..4faeaad 100644 --- a/fancy_gym/envs/mujoco/hopper_jump/mp_wrapper.py +++ b/fancy_gym/envs/mujoco/hopper_jump/mp_wrapper.py @@ -6,6 +6,11 @@ from fancy_gym.black_box.raw_interface_wrapper import RawInterfaceWrapper class MPWrapper(RawInterfaceWrapper): + mp_config = { + 'ProMP': {}, + 'DMP': {}, + 'ProDMP': {}, + } # Random x goal + random init pos @property diff --git a/fancy_gym/envs/mujoco/hopper_throw/mp_wrapper.py b/fancy_gym/envs/mujoco/hopper_throw/mp_wrapper.py index cad680a..03588a2 100644 --- a/fancy_gym/envs/mujoco/hopper_throw/mp_wrapper.py +++ b/fancy_gym/envs/mujoco/hopper_throw/mp_wrapper.py @@ -6,6 +6,11 @@ from fancy_gym.black_box.raw_interface_wrapper import RawInterfaceWrapper class MPWrapper(RawInterfaceWrapper): + mp_config = { + 'ProMP': {}, + 'DMP': {}, + 'ProDMP': {}, + } @property def context_mask(self): diff --git a/fancy_gym/envs/mujoco/walker_2d_jump/mp_wrapper.py b/fancy_gym/envs/mujoco/walker_2d_jump/mp_wrapper.py index d55e9d2..3dd8c55 100644 --- a/fancy_gym/envs/mujoco/walker_2d_jump/mp_wrapper.py +++ b/fancy_gym/envs/mujoco/walker_2d_jump/mp_wrapper.py @@ -6,6 +6,11 @@ from fancy_gym.black_box.raw_interface_wrapper import RawInterfaceWrapper class MPWrapper(RawInterfaceWrapper): + mp_config = { + 'ProMP': {}, + 'DMP': {}, + 'ProDMP': {}, + } @property def context_mask(self):