From 5744d339accf93e2a3da4b60e83329fb8b0fb7a1 Mon Sep 17 00:00:00 2001 From: Hongyi Zhou Date: Thu, 1 Dec 2022 14:04:11 +0100 Subject: [PATCH] change time limits for tt to 350 --- fancy_gym/envs/__init__.py | 1 - .../envs/mujoco/table_tennis/table_tennis_env.py | 2 +- fancy_gym/examples/examples_movement_primitives.py | 14 +++++++------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/fancy_gym/envs/__init__.py b/fancy_gym/envs/__init__.py index bbcdd91..2fddbf3 100644 --- a/fancy_gym/envs/__init__.py +++ b/fancy_gym/envs/__init__.py @@ -561,7 +561,6 @@ for _v in _versions: kwargs_dict_tt_promp['basis_generator_kwargs']['num_basis'] = 3 kwargs_dict_tt_promp['basis_generator_kwargs']['num_basis_zero_start'] = 2 kwargs_dict_tt_promp['basis_generator_kwargs']['num_basis_zero_goal'] = 1 - kwargs_dict_tt_promp['black_box_kwargs']['duration'] = 2. kwargs_dict_tt_promp['black_box_kwargs']['verbose'] = 2 register( id=_env_id, 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 ad41a08..3f30256 100644 --- a/fancy_gym/envs/mujoco/table_tennis/table_tennis_env.py +++ b/fancy_gym/envs/mujoco/table_tennis/table_tennis_env.py @@ -9,7 +9,7 @@ from fancy_gym.envs.mujoco.table_tennis.table_tennis_utils import jnt_pos_low, j import mujoco -MAX_EPISODE_STEPS_TABLE_TENNIS = 250 +MAX_EPISODE_STEPS_TABLE_TENNIS = 350 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], diff --git a/fancy_gym/examples/examples_movement_primitives.py b/fancy_gym/examples/examples_movement_primitives.py index b9f82de..4aeeecc 100644 --- a/fancy_gym/examples/examples_movement_primitives.py +++ b/fancy_gym/examples/examples_movement_primitives.py @@ -155,22 +155,22 @@ def example_fully_custom_mp(seed=1, iterations=1, render=True): if __name__ == '__main__': - render = False + render = True # DMP # example_mp("HoleReacherDMP-v0", seed=10, iterations=5, render=render) # ProMP # example_mp("HoleReacherProMP-v0", seed=10, iterations=5, render=render) - example_mp("BoxPushingTemporalSparseProMP-v0", seed=10, iterations=1, render=render) + # example_mp("BoxPushingTemporalSparseProMP-v0", seed=10, iterations=1, render=render) example_mp("TableTennis4DProMP-v0", seed=10, iterations=20, render=render) example_mp("TableTennisWindProMP-v0", seed=10, iterations=20, render=render) example_mp("TableTennisGoalSwitchingProMP-v0", seed=10, iterations=20, render=render) - # ProDMP - example_mp("BoxPushingDenseReplanProDMP-v0", seed=10, iterations=4, render=render) - example_mp("TableTennis4DProDMP-v0", seed=10, iterations=20, render=render) - example_mp("TableTennisWindProDMP-v0", seed=10, iterations=20, render=render) - example_mp("TableTennisGoalSwitchingProDMP-v0", seed=10, iterations=20, render=render) + # ProDMP with Replanning + # example_mp("BoxPushingDenseReplanProDMP-v0", seed=10, iterations=4, render=render) + # example_mp("TableTennis4DProDMP-v0", seed=10, iterations=100, render=render) + # example_mp("TableTennisWindProDMP-v0", seed=10, iterations=100, render=render) + # example_mp("TableTennisGoalSwitchingProDMP-v0", seed=10, iterations=100, render=render) # Altered basis functions # obs1 = example_custom_mp("Reacher5dProMP-v0", seed=10, iterations=1, render=render)