Bug fixes for wrapped OpenAi environments
This commit is contained in:
parent
585bdc7b47
commit
28d10ef089
@ -571,7 +571,7 @@ register(
|
|||||||
"mp_kwargs": {
|
"mp_kwargs": {
|
||||||
"num_dof": 1,
|
"num_dof": 1,
|
||||||
"num_basis": 4,
|
"num_basis": 4,
|
||||||
"duration": 100,
|
"duration": 2,
|
||||||
"post_traj_time": 0,
|
"post_traj_time": 0,
|
||||||
"width": 0.02,
|
"width": 0.02,
|
||||||
"policy_type": "motor",
|
"policy_type": "motor",
|
||||||
@ -613,7 +613,7 @@ register(
|
|||||||
"mp_kwargs": {
|
"mp_kwargs": {
|
||||||
"num_dof": 4,
|
"num_dof": 4,
|
||||||
"num_basis": 5,
|
"num_basis": 5,
|
||||||
"duration": 1,
|
"duration": 2,
|
||||||
"post_traj_time": 0,
|
"post_traj_time": 0,
|
||||||
"width": 0.02,
|
"width": 0.02,
|
||||||
"policy_type": "position"
|
"policy_type": "position"
|
||||||
@ -630,7 +630,7 @@ register(
|
|||||||
"mp_kwargs": {
|
"mp_kwargs": {
|
||||||
"num_dof": 4,
|
"num_dof": 4,
|
||||||
"num_basis": 5,
|
"num_basis": 5,
|
||||||
"duration": 1,
|
"duration": 2,
|
||||||
"post_traj_time": 0,
|
"post_traj_time": 0,
|
||||||
"width": 0.02,
|
"width": 0.02,
|
||||||
"policy_type": "position"
|
"policy_type": "position"
|
||||||
|
@ -14,4 +14,4 @@ class MPWrapper(MPEnvWrapper):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def dt(self) -> Union[float, int]:
|
def dt(self) -> Union[float, int]:
|
||||||
return 1.
|
return 0.02
|
@ -6,8 +6,8 @@ from mp_env_api.env_wrappers.positional_env_wrapper import PositionalEnvWrapper
|
|||||||
class PositionalWrapper(PositionalEnvWrapper):
|
class PositionalWrapper(PositionalEnvWrapper):
|
||||||
@property
|
@property
|
||||||
def current_vel(self) -> Union[float, int, np.ndarray]:
|
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
|
@property
|
||||||
def current_pos(self) -> Union[float, int, np.ndarray]:
|
def current_pos(self) -> Union[float, int, np.ndarray]:
|
||||||
return self._get_obs()["observation"][:4]
|
return self.unwrapped._get_obs()["observation"][:4]
|
Loading…
Reference in New Issue
Block a user