added non-contextual envs

This commit is contained in:
Onur 2022-04-20 10:50:41 +02:00
parent 092525889b
commit 1c9019ab08

View File

@ -192,69 +192,150 @@ register(
}
)
# CtxtFree are v0, Contextual are v1
register(
id='ALRAntJump-v0',
entry_point='alr_envs.alr.mujoco:ALRAntJumpEnv',
max_episode_steps=MAX_EPISODE_STEPS_ANTJUMP,
kwargs={
"max_episode_steps": MAX_EPISODE_STEPS_ANTJUMP
"max_episode_steps": MAX_EPISODE_STEPS_ANTJUMP,
"context": False
}
)
# CtxtFree are v0, Contextual are v1
register(
id='ALRAntJump-v1',
entry_point='alr_envs.alr.mujoco:ALRAntJumpEnv',
max_episode_steps=MAX_EPISODE_STEPS_ANTJUMP,
kwargs={
"max_episode_steps": MAX_EPISODE_STEPS_ANTJUMP,
"context": True
}
)
# CtxtFree are v0, Contextual are v1
register(
id='ALRHalfCheetahJump-v0',
entry_point='alr_envs.alr.mujoco:ALRHalfCheetahJumpEnv',
max_episode_steps=MAX_EPISODE_STEPS_HALFCHEETAHJUMP,
kwargs={
"max_episode_steps": MAX_EPISODE_STEPS_HALFCHEETAHJUMP
"max_episode_steps": MAX_EPISODE_STEPS_HALFCHEETAHJUMP,
"context": False
}
)
# CtxtFree are v0, Contextual are v1
register(
id='ALRHalfCheetahJump-v1',
entry_point='alr_envs.alr.mujoco:ALRHalfCheetahJumpEnv',
max_episode_steps=MAX_EPISODE_STEPS_HALFCHEETAHJUMP,
kwargs={
"max_episode_steps": MAX_EPISODE_STEPS_HALFCHEETAHJUMP,
"context": True
}
)
# CtxtFree are v0, Contextual are v1
register(
id='ALRHopperJump-v0',
entry_point='alr_envs.alr.mujoco:ALRHopperJumpEnv',
max_episode_steps=MAX_EPISODE_STEPS_HOPPERJUMP,
kwargs={
"max_episode_steps": MAX_EPISODE_STEPS_HOPPERJUMP
"max_episode_steps": MAX_EPISODE_STEPS_HOPPERJUMP,
"context": False
}
)
register(
id='ALRHopperJump-v1',
entry_point='alr_envs.alr.mujoco:ALRHopperJumpEnv',
max_episode_steps=MAX_EPISODE_STEPS_HOPPERJUMP,
kwargs={
"max_episode_steps": MAX_EPISODE_STEPS_HOPPERJUMP,
"context": True
}
)
# CtxtFree are v0, Contextual are v1
register(
id='ALRHopperJumpOnBox-v0',
entry_point='alr_envs.alr.mujoco:ALRHopperJumpOnBoxEnv',
max_episode_steps=MAX_EPISODE_STEPS_HOPPERJUMPONBOX,
kwargs={
"max_episode_steps": MAX_EPISODE_STEPS_HOPPERJUMPONBOX
"max_episode_steps": MAX_EPISODE_STEPS_HOPPERJUMPONBOX,
"context": False
}
)
# CtxtFree are v0, Contextual are v1
register(
id='ALRHopperJumpOnBox-v1',
entry_point='alr_envs.alr.mujoco:ALRHopperJumpOnBoxEnv',
max_episode_steps=MAX_EPISODE_STEPS_HOPPERJUMPONBOX,
kwargs={
"max_episode_steps": MAX_EPISODE_STEPS_HOPPERJUMPONBOX,
"context": True
}
)
# CtxtFree are v0, Contextual are v1
register(
id='ALRHopperThrow-v0',
entry_point='alr_envs.alr.mujoco:ALRHopperThrowEnv',
max_episode_steps=MAX_EPISODE_STEPS_HOPPERTHROW,
kwargs={
"max_episode_steps": MAX_EPISODE_STEPS_HOPPERTHROW
"max_episode_steps": MAX_EPISODE_STEPS_HOPPERTHROW,
"context": False
}
)
# CtxtFree are v0, Contextual are v1
register(
id='ALRHopperThrow-v1',
entry_point='alr_envs.alr.mujoco:ALRHopperThrowEnv',
max_episode_steps=MAX_EPISODE_STEPS_HOPPERTHROW,
kwargs={
"max_episode_steps": MAX_EPISODE_STEPS_HOPPERTHROW,
"context": True
}
)
# CtxtFree are v0, Contextual are v1
register(
id='ALRHopperThrowInBasket-v0',
entry_point='alr_envs.alr.mujoco:ALRHopperThrowInBasketEnv',
max_episode_steps=MAX_EPISODE_STEPS_HOPPERTHROWINBASKET,
kwargs={
"max_episode_steps": MAX_EPISODE_STEPS_HOPPERTHROWINBASKET
"max_episode_steps": MAX_EPISODE_STEPS_HOPPERTHROWINBASKET,
"context": False
}
)
# CtxtFree are v0, Contextual are v1
register(
id='ALRHopperThrowInBasket-v1',
entry_point='alr_envs.alr.mujoco:ALRHopperThrowInBasketEnv',
max_episode_steps=MAX_EPISODE_STEPS_HOPPERTHROWINBASKET,
kwargs={
"max_episode_steps": MAX_EPISODE_STEPS_HOPPERTHROWINBASKET,
"context": True
}
)
# CtxtFree are v0, Contextual are v1
register(
id='ALRWalker2DJump-v0',
entry_point='alr_envs.alr.mujoco:ALRWalker2dJumpEnv',
max_episode_steps=MAX_EPISODE_STEPS_WALKERJUMP,
kwargs={
"max_episode_steps": MAX_EPISODE_STEPS_WALKERJUMP
"max_episode_steps": MAX_EPISODE_STEPS_WALKERJUMP,
"context": False
}
)
# CtxtFree are v0, Contextual are v1
register(
id='ALRWalker2DJump-v1',
entry_point='alr_envs.alr.mujoco:ALRWalker2dJumpEnv',
max_episode_steps=MAX_EPISODE_STEPS_WALKERJUMP,
kwargs={
"max_episode_steps": MAX_EPISODE_STEPS_WALKERJUMP,
"context": True
}
)
## Balancing Reacher
register(
@ -502,40 +583,15 @@ for _v, cd in enumerate(ctxt_dim):
)
ALL_ALR_MOTION_PRIMITIVE_ENVIRONMENTS["ProMP"].append(_env_id)
## AntJump
for _v, cd in enumerate(ctxt_dim):
_env_id = f'TableTennisProMP-v{_v}'
_versions = ["v0", "v1"]
for _v in _versions:
_env_id = f'ALRAntJumpProMP-{_v}'
register(
id=_env_id,
entry_point='alr_envs.utils.make_env_helpers:make_promp_env_helper',
kwargs={
"name": "alr_envs:TableTennis{}DCtxt-v0".format(cd),
"wrappers": [mujoco.table_tennis.MPWrapper],
"mp_kwargs": {
"num_dof": 7,
"num_basis": 2,
"duration": 1.25,
"post_traj_time": 1.5,
"policy_type": "motor",
"weights_scale": 1.0,
"zero_start": True,
"zero_goal": False,
"policy_kwargs": {
"p_gains": 0.5*np.array([1.0, 4.0, 2.0, 4.0, 1.0, 4.0, 1.0]),
"d_gains": 0.5*np.array([0.1, 0.4, 0.2, 0.4, 0.1, 0.4, 0.1])
}
}
}
)
ALL_ALR_MOTION_PRIMITIVE_ENVIRONMENTS["ProMP"].append(_env_id)
register(
id='ALRAntJumpProMP-v0',
entry_point='alr_envs.utils.make_env_helpers:make_promp_env_helper',
kwargs={
"name": "alr_envs:ALRAntJump-v0",
"name": f"alr_envs:ALRAntJump-{_v}",
"wrappers": [mujoco.ant_jump.MPWrapper],
"mp_kwargs": {
"num_dof": 8,
@ -552,14 +608,18 @@ register(
}
}
}
)
ALL_ALR_MOTION_PRIMITIVE_ENVIRONMENTS["ProMP"].append('ALRAntJumpProMP-v0')
)
ALL_ALR_MOTION_PRIMITIVE_ENVIRONMENTS["ProMP"].append(_env_id)
register(
id='ALRHalfCheetahJumpProMP-v0',
## HalfCheetahJump
_versions = ["v0", "v1"]
for _v in _versions:
_env_id = f'ALRHalfCheetahJumpProMP-{_v}'
register(
id=_env_id,
entry_point='alr_envs.utils.make_env_helpers:make_promp_env_helper',
kwargs={
"name": "alr_envs:ALRHalfCheetahJump-v0",
"name": f"alr_envs:ALRHalfCheetahJump-{_v}",
"wrappers": [mujoco.half_cheetah_jump.MPWrapper],
"mp_kwargs": {
"num_dof": 6,
@ -576,15 +636,18 @@ register(
}
}
}
)
ALL_ALR_MOTION_PRIMITIVE_ENVIRONMENTS["ProMP"].append('ALRHalfCheetahJumpProMP-v0')
)
ALL_ALR_MOTION_PRIMITIVE_ENVIRONMENTS["ProMP"].append(_env_id)
register(
id='ALRHopperJumpProMP-v0',
## HopperJump
_versions = ["v0", "v1"]
for _v in _versions:
_env_id = f'ALRHopperJumpProMP-{_v}'
register(
id= _env_id,
entry_point='alr_envs.utils.make_env_helpers:make_promp_env_helper',
kwargs={
"name": "alr_envs:ALRHopperJump-v0",
"name": f"alr_envs:ALRHopperJump-{_v}",
"wrappers": [mujoco.hopper_jump.MPWrapper],
"mp_kwargs": {
"num_dof": 3,
@ -601,14 +664,18 @@ register(
}
}
}
)
ALL_ALR_MOTION_PRIMITIVE_ENVIRONMENTS["ProMP"].append('ALRHopperJumpProMP-v0')
)
ALL_ALR_MOTION_PRIMITIVE_ENVIRONMENTS["ProMP"].append(_env_id)
register(
id='ALRHopperJumpOnBoxProMP-v0',
## HopperJumpOnBox
_versions = ["v0", "v1"]
for _v in _versions:
_env_id = f'ALRHopperJumpOnBoxProMP-{_v}'
register(
id=_env_id,
entry_point='alr_envs.utils.make_env_helpers:make_promp_env_helper',
kwargs={
"name": "alr_envs:ALRHopperJumpOnBox-v0",
"name": f"alr_envs:ALRHopperJumpOnBox-{_v}",
"wrappers": [mujoco.hopper_jump.MPWrapper],
"mp_kwargs": {
"num_dof": 3,
@ -625,15 +692,18 @@ register(
}
}
}
)
ALL_ALR_MOTION_PRIMITIVE_ENVIRONMENTS["ProMP"].append('ALRHopperJumpOnBoxProMP-v0')
)
ALL_ALR_MOTION_PRIMITIVE_ENVIRONMENTS["ProMP"].append(_env_id)
register(
id='ALRHopperThrowProMP-v0',
#HopperThrow
_versions = ["v0", "v1"]
for _v in _versions:
_env_id = f'ALRHopperThrowProMP-{_v}'
register(
id=_env_id,
entry_point='alr_envs.utils.make_env_helpers:make_promp_env_helper',
kwargs={
"name": "alr_envs:ALRHopperThrow-v0",
"name": f"alr_envs:ALRHopperThrow-{_v}",
"wrappers": [mujoco.hopper_throw.MPWrapper],
"mp_kwargs": {
"num_dof": 3,
@ -650,15 +720,18 @@ register(
}
}
}
)
ALL_ALR_MOTION_PRIMITIVE_ENVIRONMENTS["ProMP"].append('ALRHopperThrowProMP-v0')
)
ALL_ALR_MOTION_PRIMITIVE_ENVIRONMENTS["ProMP"].append(_env_id)
register(
id='ALRHopperThrowInBasketProMP-v0',
## HopperThrowInBasket
_versions = ["v0", "v1"]
for _v in _versions:
_env_id = f'ALRHopperThrowInBasketProMP-{_v}'
register(
id=_env_id,
entry_point='alr_envs.utils.make_env_helpers:make_promp_env_helper',
kwargs={
"name": "alr_envs:ALRHopperThrowInBasket-v0",
"name": f"alr_envs:ALRHopperThrowInBasket-{_v}",
"wrappers": [mujoco.hopper_throw.MPWrapper],
"mp_kwargs": {
"num_dof": 3,
@ -675,15 +748,18 @@ register(
}
}
}
)
ALL_ALR_MOTION_PRIMITIVE_ENVIRONMENTS["ProMP"].append('ALRHopperThrowInBasketProMP-v0')
)
ALL_ALR_MOTION_PRIMITIVE_ENVIRONMENTS["ProMP"].append(_env_id)
register(
id='ALRWalker2DJumpProMP-v0',
## Walker2DJump
_versions = ["v0", "v1"]
for _v in _versions:
_env_id = f'ALRWalker2DJumpProMP-{_v}'
register(
id=_env_id,
entry_point='alr_envs.utils.make_env_helpers:make_promp_env_helper',
kwargs={
"name": "alr_envs:ALRWalker2DJump-v0",
"name": f"alr_envs:ALRWalker2DJump-{_v}",
"wrappers": [mujoco.walker_2d_jump.MPWrapper],
"mp_kwargs": {
"num_dof": 6,
@ -700,5 +776,5 @@ register(
}
}
}
)
ALL_ALR_MOTION_PRIMITIVE_ENVIRONMENTS["ProMP"].append('ALRWalker2DJumpProMP-v0')
)
ALL_ALR_MOTION_PRIMITIVE_ENVIRONMENTS["ProMP"].append(_env_id)