From 3bc0a23ec22880210ae5f11e761f9a0cab6d7885 Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Sun, 28 Jan 2024 12:54:49 +0100 Subject: [PATCH] BugFix: DId not pass kwargs down in new TT envs --- fancy_gym/envs/mujoco/__init__.py | 2 +- fancy_gym/envs/mujoco/table_tennis/table_tennis_env.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/fancy_gym/envs/mujoco/__init__.py b/fancy_gym/envs/mujoco/__init__.py index 4afdcce..4bdab68 100644 --- a/fancy_gym/envs/mujoco/__init__.py +++ b/fancy_gym/envs/mujoco/__init__.py @@ -8,7 +8,7 @@ from .hopper_throw.hopper_throw_in_basket import HopperThrowInBasketEnv from .reacher.reacher import ReacherEnv from .walker_2d_jump.walker_2d_jump import Walker2dJumpEnv from .box_pushing.box_pushing_env import BoxPushingDense, BoxPushingTemporalSparse, BoxPushingTemporalSpatialSparse -from .table_tennis.table_tennis_env import TableTennisEnv, TableTennisWind, TableTennisGoalSwitching +from .table_tennis.table_tennis_env import TableTennisEnv, TableTennisWind, TableTennisGoalSwitching, TableTennisMarkovian, TableTennisRandomInit try: from .air_hockey.air_hockey_env_wrapper import AirHockeyEnv 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 e085c61..7ece282 100644 --- a/fancy_gym/envs/mujoco/table_tennis/table_tennis_env.py +++ b/fancy_gym/envs/mujoco/table_tennis/table_tennis_env.py @@ -41,6 +41,7 @@ class TableTennisEnv(MujocoEnv, utils.EzPickle): enable_artificial_wind: bool = False, random_pos_scale: float = 0.0, random_vel_scale: float = 0.0, + **kwargs, ): utils.EzPickle.__init__(**locals()) self._steps = 0 @@ -490,8 +491,9 @@ class TableTennisGoalSwitching(TableTennisEnv): class TableTennisRandomInit(TableTennisEnv): def __init__(self, ctxt_dim: int = 4, frame_skip: int = 4, random_pos_scale: float = 1.0, - random_vel_scale: float = 0.0): + random_vel_scale: float = 0.0, + **kwargs): super().__init__(ctxt_dim=ctxt_dim, frame_skip=frame_skip, random_pos_scale=random_pos_scale, - random_vel_scale=random_vel_scale) - + random_vel_scale=random_vel_scale, + **kwargs) \ No newline at end of file