diff --git a/fancy_gym/black_box/black_box_wrapper.py b/fancy_gym/black_box/black_box_wrapper.py index a8baa84..ad79fc9 100644 --- a/fancy_gym/black_box/black_box_wrapper.py +++ b/fancy_gym/black_box/black_box_wrapper.py @@ -194,7 +194,7 @@ class BlackBoxWrapper(gym.ObservationWrapper): if done or self.replanning_schedule(current_pos, current_vel, obs, c_action, t + 1 + self.current_traj_steps): - if self.max_planning_times is not None and self.plan_steps >= self.max_planning_times: + if not done and self.max_planning_times is not None and self.plan_steps >= self.max_planning_times: continue self.condition_pos = pos if self.condition_on_desired else None diff --git a/fancy_gym/examples/examples_movement_primitives.py b/fancy_gym/examples/examples_movement_primitives.py index 7ac6c69..a58d08b 100644 --- a/fancy_gym/examples/examples_movement_primitives.py +++ b/fancy_gym/examples/examples_movement_primitives.py @@ -162,11 +162,11 @@ 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=20, render=render) + # example_mp("TableTennis4DProMP-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) # Altered basis functions # obs1 = example_custom_mp("Reacher5dProMP-v0", seed=10, iterations=1, render=render)