fix time aware observation wrapper issue and add try catch for rendering dmc

This commit is contained in:
Onur
2022-07-12 11:37:52 +02:00
parent da49d1b7f7
commit 77976aef21
5 changed files with 22 additions and 24 deletions
+8 -8
View File
@@ -1,5 +1,6 @@
from typing import Union, Tuple
import gym
import numpy as np
from alr_envs.black_box.raw_interface_wrapper import RawInterfaceWrapper
@@ -9,14 +10,13 @@ class MPWrapper(RawInterfaceWrapper):
@property
def context_mask(self):
return np.concatenate([
[False] * self.env.n_links, # cos
[False] * self.env.n_links, # sin
[True] * 2, # goal position
[False] * self.env.n_links, # angular velocity
[False] * 3, # goal distance
# [False], # step
])
return np.concatenate([[False] * self.env.n_links, # cos
[False] * self.env.n_links, # sin
[True] * 2, # goal position
[False] * self.env.n_links, # angular velocity
[False] * 3, # goal distance
# [False], # step
])
@property
def current_pos(self) -> Union[float, int, np.ndarray, Tuple]: