Bug fixes for wrapped OpenAi environments

This commit is contained in:
Marcel 2021-07-05 08:14:39 +02:00
parent 585bdc7b47
commit 28d10ef089
3 changed files with 6 additions and 6 deletions

View File

@ -571,7 +571,7 @@ register(
"mp_kwargs": {
"num_dof": 1,
"num_basis": 4,
"duration": 100,
"duration": 2,
"post_traj_time": 0,
"width": 0.02,
"policy_type": "motor",
@ -613,7 +613,7 @@ register(
"mp_kwargs": {
"num_dof": 4,
"num_basis": 5,
"duration": 1,
"duration": 2,
"post_traj_time": 0,
"width": 0.02,
"policy_type": "position"
@ -630,7 +630,7 @@ register(
"mp_kwargs": {
"num_dof": 4,
"num_basis": 5,
"duration": 1,
"duration": 2,
"post_traj_time": 0,
"width": 0.02,
"policy_type": "position"

View File

@ -14,4 +14,4 @@ class MPWrapper(MPEnvWrapper):
@property
def dt(self) -> Union[float, int]:
return 1.
return 0.02

View File

@ -6,8 +6,8 @@ from mp_env_api.env_wrappers.positional_env_wrapper import PositionalEnvWrapper
class PositionalWrapper(PositionalEnvWrapper):
@property
def current_vel(self) -> Union[float, int, np.ndarray]:
return self._get_obs()["observation"][-5:-1]
return self.unwrapped._get_obs()["observation"][-5:-1]
@property
def current_pos(self) -> Union[float, int, np.ndarray]:
return self._get_obs()["observation"][:4]
return self.unwrapped._get_obs()["observation"][:4]