From cd2b679e9bd1f3a7f35fcf33588ed4b729566fd9 Mon Sep 17 00:00:00 2001 From: Hongyi Zhou Date: Mon, 31 Oct 2022 13:52:40 +0100 Subject: [PATCH] use observation mask for replanning --- fancy_gym/black_box/black_box_wrapper.py | 3 ++- fancy_gym/envs/mujoco/box_pushing/mp_wrapper.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fancy_gym/black_box/black_box_wrapper.py b/fancy_gym/black_box/black_box_wrapper.py index 45a92f5..ad314f9 100644 --- a/fancy_gym/black_box/black_box_wrapper.py +++ b/fancy_gym/black_box/black_box_wrapper.py @@ -61,7 +61,8 @@ class BlackBoxWrapper(gym.ObservationWrapper): # self.traj_gen.basis_gn.show_basis(plot=True) # spaces - self.return_context_observation = not (learn_sub_trajectories or self.do_replanning) + # self.return_context_observation = not (learn_sub_trajectories or self.do_replanning) + self.return_context_observation = True self.traj_gen_action_space = self._get_traj_gen_action_space() # self.action_space = self._get_action_space() diff --git a/fancy_gym/envs/mujoco/box_pushing/mp_wrapper.py b/fancy_gym/envs/mujoco/box_pushing/mp_wrapper.py index 52f6e13..ccf4c57 100644 --- a/fancy_gym/envs/mujoco/box_pushing/mp_wrapper.py +++ b/fancy_gym/envs/mujoco/box_pushing/mp_wrapper.py @@ -20,7 +20,7 @@ class MPWrapper(RawInterfaceWrapper): [True] * 4, # orientation of box [True] * 3, # position of target [True] * 4, # orientation of target - # [True] * 1, # time + [True] * 1, # time ]) @property