diff --git a/fancy_gym/envs/__init__.py b/fancy_gym/envs/__init__.py index 06c594b..2069f03 100644 --- a/fancy_gym/envs/__init__.py +++ b/fancy_gym/envs/__init__.py @@ -258,7 +258,8 @@ for ctxt_dim in [2, 4]: max_episode_steps=350, kwargs={ "ctxt_dim": ctxt_dim, - 'frame_skip': 4 + 'frame_skip': 4, + 'enable_wind': True } ) diff --git a/fancy_gym/envs/mujoco/table_tennis/table_tennis_env.py b/fancy_gym/envs/mujoco/table_tennis/table_tennis_env.py index 507513f..9bfc7d1 100644 --- a/fancy_gym/envs/mujoco/table_tennis/table_tennis_env.py +++ b/fancy_gym/envs/mujoco/table_tennis/table_tennis_env.py @@ -21,6 +21,7 @@ class TableTennisEnv(MujocoEnv, utils.EzPickle): """ def __init__(self, ctxt_dim: int = 2, frame_skip: int = 4, + enable_switching_goal: bool = False, enable_wind: bool = False, enable_magnus: bool = False): utils.EzPickle.__init__(**locals()) self._steps = 0 @@ -55,7 +56,9 @@ class TableTennisEnv(MujocoEnv, utils.EzPickle): self.action_space = spaces.Box(low=-1, high=1, shape=(7,), dtype=np.float32) - # complex dynamics settings + self._enable_switching_goal = enable_switching_goal + + # complex dynamics settings self.model.opt.density = 1.225 self.model.opt.viscosity = 2.27e-5 self._enable_wind = enable_wind