diff --git a/fancy_gym/black_box/black_box_wrapper.py b/fancy_gym/black_box/black_box_wrapper.py index 735efec..3b3ac55 100644 --- a/fancy_gym/black_box/black_box_wrapper.py +++ b/fancy_gym/black_box/black_box_wrapper.py @@ -70,7 +70,10 @@ class BlackBoxWrapper(gym.ObservationWrapper): # tricky_action_upperbound = [np.inf] * (self.traj_gen_action_space.shape[0] - 7) # tricky_action_lowerbound = [-np.inf] * (self.traj_gen_action_space.shape[0] - 7) # self.action_space = spaces.Box(np.array(tricky_action_lowerbound), np.array(tricky_action_upperbound), dtype=np.float32) - + self.action_space.low[0] = 0.5 + self.action_space.high[0] = 1.5 + self.action_space.low[1] = 0.05 + self.action_space.high[1] = 0.2 self.observation_space = self._get_observation_space() # rendering diff --git a/fancy_gym/envs/mujoco/table_tennis/table_tennis_env.py b/fancy_gym/envs/mujoco/table_tennis/table_tennis_env.py index f169e6a..93f1c29 100644 --- a/fancy_gym/envs/mujoco/table_tennis/table_tennis_env.py +++ b/fancy_gym/envs/mujoco/table_tennis/table_tennis_env.py @@ -10,9 +10,9 @@ import mujoco MAX_EPISODE_STEPS_TABLE_TENNIS = 250 -CONTEXT_BOUNDS_2DIMS = np.array([[-1.2, -0.6], [-0.2, 0.0]]) -CONTEXT_BOUNDS_4DIMS = np.array([[-1.2, -0.6, -1.0, -0.65], - [-0.2, 0.6, -0.2, 0.65]]) +CONTEXT_BOUNDS_2DIMS = np.array([[-1.0, -0.65], [-0.2, 0.65]]) +CONTEXT_BOUNDS_4DIMS = np.array([[-1.0, -0.65, -1.0, -0.65], + [-0.2, 0.65, -0.2, 0.65]]) class TableTennisEnv(MujocoEnv, utils.EzPickle): diff --git a/fancy_gym/examples/examples_movement_primitives.py b/fancy_gym/examples/examples_movement_primitives.py index f095d4a..a99d6b0 100644 --- a/fancy_gym/examples/examples_movement_primitives.py +++ b/fancy_gym/examples/examples_movement_primitives.py @@ -22,7 +22,6 @@ def example_mp(env_name="HoleReacherProMP-v0", seed=1, iterations=1, render=True returns = 0 # env.render(mode=None) obs = env.reset() - print(obs) # number of samples/full trajectories (multiple environment steps) for i in range(iterations): @@ -51,7 +50,7 @@ def example_mp(env_name="HoleReacherProMP-v0", seed=1, iterations=1, render=True if done: # print(reward) obs = env.reset() - print(obs) + print("steps: {}".format(info["num_steps"][-1])) def example_custom_mp(env_name="Reacher5dProMP-v0", seed=1, iterations=1, render=True): @@ -166,7 +165,7 @@ if __name__ == '__main__': # ProMP # example_mp("HoleReacherProMP-v0", seed=10, iterations=5, render=render) # example_mp("BoxPushingTemporalSparseProMP-v0", seed=10, iterations=1, render=render) - example_mp("TableTennis4DProMP-v0", seed=10, iterations=5, render=render) + example_mp("TableTennis4DProMP-v0", seed=10, iterations=10, render=True) # ProDMP # example_mp("BoxPushingDenseProDMP-v0", seed=10, iterations=16, render=render)