fixed OpenAI fetch tasks; added nicer imports

This commit is contained in:
ottofabian
2021-07-30 11:59:02 +02:00
parent f5fcbf7f54
commit a11965827d
41 changed files with 316 additions and 159 deletions
@@ -0,0 +1 @@
from .mp_wrapper import MPWrapper
@@ -0,0 +1,19 @@
from typing import Union
import numpy as np
from mp_env_api import MPEnvWrapper
class MPWrapper(MPEnvWrapper):
@property
def current_vel(self) -> Union[float, int, np.ndarray]:
return self.sim.data.qvel[:2]
@property
def current_pos(self) -> Union[float, int, np.ndarray]:
return self.sim.data.qpos[:2]
@property
def dt(self) -> Union[float, int]:
return self.env.dt