From 7e71e7086138521f041f165450f7006fef726d99 Mon Sep 17 00:00:00 2001 From: Hongyi Zhou Date: Tue, 22 Nov 2022 10:32:51 +0100 Subject: [PATCH] updates for debug --- fancy_gym/black_box/black_box_wrapper.py | 4 ++++ fancy_gym/envs/mujoco/table_tennis/table_tennis_env.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/fancy_gym/black_box/black_box_wrapper.py b/fancy_gym/black_box/black_box_wrapper.py index 698adce..5b9a5b9 100644 --- a/fancy_gym/black_box/black_box_wrapper.py +++ b/fancy_gym/black_box/black_box_wrapper.py @@ -170,6 +170,10 @@ class BlackBoxWrapper(gym.ObservationWrapper): # TODO remove this part, right now only needed for beer pong # mp_params, env_spec_params, proceed = self.env.episode_callback(action, self.traj_gen) position, velocity = self.get_trajectory(action) + + print("position", position) + print("velocity", velocity) + traj_is_valid = self.env.episode_callback(action, position, velocity) trajectory_length = len(position) 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 9b2359a..72b92e0 100644 --- a/fancy_gym/envs/mujoco/table_tennis/table_tennis_env.py +++ b/fancy_gym/envs/mujoco/table_tennis/table_tennis_env.py @@ -151,8 +151,8 @@ class TableTennisEnv(MujocoEnv, utils.EzPickle): def reset_model(self): self._steps = 0 - self._init_ball_state = self._generate_valid_init_ball(random_pos=True, random_vel=False) - self._goal_pos = self._generate_goal_pos(random=True) + self._init_ball_state = self._generate_valid_init_ball(random_pos=False, random_vel=False) + self._goal_pos = self._generate_goal_pos(random=False) self.data.joint("tar_x").qpos = self._init_ball_state[0] self.data.joint("tar_y").qpos = self._init_ball_state[1] self.data.joint("tar_z").qpos = self._init_ball_state[2]