bp frameskip sanity check

This commit is contained in:
Onur 2022-05-29 13:32:45 +02:00
parent 3cc1cd1456
commit 9b4a0f89b6
3 changed files with 5 additions and 11 deletions

View File

@ -400,11 +400,11 @@ register(id='TableTennis4DCtxt-v0',
register(
id='ALRBeerPong-v0',
entry_point='alr_envs.alr.mujoco:ALRBeerBongEnv',
max_episode_steps=150,
max_episode_steps=600,
kwargs={
"rndm_goal": False,
"cup_goal_pos": [0.1, -2.0],
"frameskip": 4
"frame_skip": 1
}
)
@ -413,11 +413,11 @@ register(
register(
id='ALRBeerPong-v1',
entry_point='alr_envs.alr.mujoco:ALRBeerBongEnv',
max_episode_steps=150,
max_episode_steps=600,
kwargs={
"rndm_goal": True,
"cup_goal_pos": [-0.3, -1.2],
"frameskip": 4
"frame_skip": 1
}
)

View File

@ -177,12 +177,7 @@ class ALRBeerBongEnv(MujocoEnv, utils.EzPickle):
@property
def dt(self):
return super(ALRBeerBongEnv, self).dt()*self.repeat_action
class ALRBeerPongStepEnv(ALRBeerBongEnv):
def __init__(self, frame_skip=1, apply_gravity_comp=True, noisy=False,
rndm_goal=False, cup_goal_pos=None):
super(ALRBeerPongStepEnv, self).__init__(frame_skip, apply_gravity_comp, noisy, rndm_goal, cup_goal_pos)
return super(ALRBeerBongEnv, self).dt*self.repeat_action
if __name__ == "__main__":
env = ALRBeerBongEnv(rndm_goal=True)

View File

@ -39,7 +39,6 @@ class NewMPWrapper(EpisodicWrapper):
def _episode_callback(self, action: np.ndarray) -> Tuple[np.ndarray, Union[np.ndarray, None]]:
if self.mp.learn_tau:
self.env.env.release_step = action[0]/self.env.dt # Tau value
# self.env.env.release_step = np.clip(action[0]/self.env.dt, 20, 260) # Tau value
return action, None
else:
return action, None