bp frameskip sanity check
This commit is contained in:
parent
3cc1cd1456
commit
9b4a0f89b6
@ -400,11 +400,11 @@ register(id='TableTennis4DCtxt-v0',
|
|||||||
register(
|
register(
|
||||||
id='ALRBeerPong-v0',
|
id='ALRBeerPong-v0',
|
||||||
entry_point='alr_envs.alr.mujoco:ALRBeerBongEnv',
|
entry_point='alr_envs.alr.mujoco:ALRBeerBongEnv',
|
||||||
max_episode_steps=150,
|
max_episode_steps=600,
|
||||||
kwargs={
|
kwargs={
|
||||||
"rndm_goal": False,
|
"rndm_goal": False,
|
||||||
"cup_goal_pos": [0.1, -2.0],
|
"cup_goal_pos": [0.1, -2.0],
|
||||||
"frameskip": 4
|
"frame_skip": 1
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -413,11 +413,11 @@ register(
|
|||||||
register(
|
register(
|
||||||
id='ALRBeerPong-v1',
|
id='ALRBeerPong-v1',
|
||||||
entry_point='alr_envs.alr.mujoco:ALRBeerBongEnv',
|
entry_point='alr_envs.alr.mujoco:ALRBeerBongEnv',
|
||||||
max_episode_steps=150,
|
max_episode_steps=600,
|
||||||
kwargs={
|
kwargs={
|
||||||
"rndm_goal": True,
|
"rndm_goal": True,
|
||||||
"cup_goal_pos": [-0.3, -1.2],
|
"cup_goal_pos": [-0.3, -1.2],
|
||||||
"frameskip": 4
|
"frame_skip": 1
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -177,12 +177,7 @@ class ALRBeerBongEnv(MujocoEnv, utils.EzPickle):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def dt(self):
|
def dt(self):
|
||||||
return super(ALRBeerBongEnv, self).dt()*self.repeat_action
|
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)
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
env = ALRBeerBongEnv(rndm_goal=True)
|
env = ALRBeerBongEnv(rndm_goal=True)
|
||||||
|
@ -39,7 +39,6 @@ class NewMPWrapper(EpisodicWrapper):
|
|||||||
def _episode_callback(self, action: np.ndarray) -> Tuple[np.ndarray, Union[np.ndarray, None]]:
|
def _episode_callback(self, action: np.ndarray) -> Tuple[np.ndarray, Union[np.ndarray, None]]:
|
||||||
if self.mp.learn_tau:
|
if self.mp.learn_tau:
|
||||||
self.env.env.release_step = action[0]/self.env.dt # Tau value
|
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
|
return action, None
|
||||||
else:
|
else:
|
||||||
return action, None
|
return action, None
|
||||||
|
Loading…
Reference in New Issue
Block a user