From ca8787f449d18a59e55cc01864429469d9d18324 Mon Sep 17 00:00:00 2001 From: Hongyi Zhou Date: Thu, 1 Dec 2022 14:34:53 +0100 Subject: [PATCH] minor updates --- fancy_gym/envs/__init__.py | 5 +++-- fancy_gym/envs/mujoco/table_tennis/table_tennis_env.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/fancy_gym/envs/__init__.py b/fancy_gym/envs/__init__.py index ea9aec7..35e1ccf 100644 --- a/fancy_gym/envs/__init__.py +++ b/fancy_gym/envs/__init__.py @@ -254,8 +254,6 @@ for ctxt_dim in [2, 4]: kwargs={ "ctxt_dim": ctxt_dim, 'frame_skip': 4, - 'goal_switching_step': None, - 'enable_artificial_wind': False, } ) @@ -269,6 +267,9 @@ register( id='TableTennisGoalSwitching-v0', entry_point='fancy_gym.envs.mujoco:TableTennisGoalSwitching', max_episode_steps=MAX_EPISODE_STEPS_TABLE_TENNIS, + kwargs={ + 'goal_switching_step': 99 + } ) 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 e574a38..dc717c2 100644 --- a/fancy_gym/envs/mujoco/table_tennis/table_tennis_env.py +++ b/fancy_gym/envs/mujoco/table_tennis/table_tennis_env.py @@ -149,8 +149,8 @@ class TableTennisEnv(MujocoEnv, utils.EzPickle): def reset_model(self): self._steps = 0 - self._init_ball_state = self._generate_valid_init_ball(random_pos=False, random_vel=False) - self._goal_pos = self._generate_goal_pos(random=False) + self._init_ball_state = self._generate_valid_init_ball(random_pos=True, random_vel=False) + self._goal_pos = self._generate_goal_pos(random=True) self.data.joint("tar_x").qpos = self._init_ball_state[0] self.data.joint("tar_y").qpos = self._init_ball_state[1] self.data.joint("tar_z").qpos = self._init_ball_state[2]