def __init__(self): self._seed() self.viewer = None # to be used later for rendering self.target_pos = None membrane_base.init_helper(self) self.object = None # Drawlist for rendering self.drawlist = [] self.prev_state = None # Observation Space # [object posx, object posy, actuator1 pos.y, ... , actuator5 pos.y, actuator1 speed.y, ... , actuator5 speed.y] high = np.array([np.inf] * 16) self.observation_space = spaces.Box(low=-high, high=high) # Continuous action space; one for each linear actuator (5 total) # action space represents velocity self.action_space = spaces.Box(-1, 1, (5, )) self.prev_shaping = None # for reward calculation self.pd_control_list = [] self._reset()
def __init__(self): self._seed() self.viewer = None # to be used later for rendering # Object to be manipulated self.object = None # Initializing other common components in the environment membrane_base.init_helper(self) self.prev_state = None # Observation Space high = np.array([np.inf] * 15) self.observation_space = spaces.Box(low=-high, high=high) # Continuous action space; one for each linear actuator (5 total) # action space represents velocity self.action_space = spaces.Box(-1, 1, (5, )) self.prev_shaping = None # for reward calculation self._reset()