fixed issue of incorrectly retrieving the current position for metaworld tasks
This commit is contained in:
parent
cc01ca2d18
commit
1983e9d96e
@ -53,7 +53,7 @@ class MPWrapper(MPEnvWrapper):
|
|||||||
@property
|
@property
|
||||||
def current_pos(self) -> Union[float, int, np.ndarray]:
|
def current_pos(self) -> Union[float, int, np.ndarray]:
|
||||||
r_close = self.env.data.get_joint_qpos("r_close")
|
r_close = self.env.data.get_joint_qpos("r_close")
|
||||||
return np.hstack([self.env.data.mocap_pos.flatten(), r_close])
|
return np.hstack([self.env.data.mocap_pos.flatten() / self.env.action_scale, r_close])
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def current_vel(self) -> Union[float, int, np.ndarray, Tuple]:
|
def current_vel(self) -> Union[float, int, np.ndarray, Tuple]:
|
||||||
|
@ -53,7 +53,7 @@ class MPWrapper(MPEnvWrapper):
|
|||||||
@property
|
@property
|
||||||
def current_pos(self) -> Union[float, int, np.ndarray]:
|
def current_pos(self) -> Union[float, int, np.ndarray]:
|
||||||
r_close = self.env.data.get_joint_qpos("r_close")
|
r_close = self.env.data.get_joint_qpos("r_close")
|
||||||
return np.hstack([self.env.data.mocap_pos.flatten(), r_close])
|
return np.hstack([self.env.data.mocap_pos.flatten() / self.env.action_scale, r_close])
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def current_vel(self) -> Union[float, int, np.ndarray, Tuple]:
|
def current_vel(self) -> Union[float, int, np.ndarray, Tuple]:
|
||||||
|
@ -53,7 +53,7 @@ class MPWrapper(MPEnvWrapper):
|
|||||||
@property
|
@property
|
||||||
def current_pos(self) -> Union[float, int, np.ndarray]:
|
def current_pos(self) -> Union[float, int, np.ndarray]:
|
||||||
r_close = self.env.data.get_joint_qpos("r_close")
|
r_close = self.env.data.get_joint_qpos("r_close")
|
||||||
return np.hstack([self.env.data.mocap_pos.flatten(), r_close])
|
return np.hstack([self.env.data.mocap_pos.flatten() / self.env.action_scale, r_close])
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def current_vel(self) -> Union[float, int, np.ndarray, Tuple]:
|
def current_vel(self) -> Union[float, int, np.ndarray, Tuple]:
|
||||||
|
@ -53,7 +53,7 @@ class MPWrapper(MPEnvWrapper):
|
|||||||
@property
|
@property
|
||||||
def current_pos(self) -> Union[float, int, np.ndarray]:
|
def current_pos(self) -> Union[float, int, np.ndarray]:
|
||||||
r_close = self.env.data.get_joint_qpos("r_close")
|
r_close = self.env.data.get_joint_qpos("r_close")
|
||||||
return np.hstack([self.env.data.mocap_pos.flatten(), r_close])
|
return np.hstack([self.env.data.mocap_pos.flatten() / self.env.action_scale, r_close])
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def current_vel(self) -> Union[float, int, np.ndarray, Tuple]:
|
def current_vel(self) -> Union[float, int, np.ndarray, Tuple]:
|
||||||
|
Loading…
Reference in New Issue
Block a user