Skip to content

Commit

Permalink
temporary solution for new gym dependency update
Browse files Browse the repository at this point in the history
  • Loading branch information
YoruCathy committed Apr 7, 2024
1 parent 7921207 commit 36fc717
Showing 1 changed file with 25 additions and 26 deletions.
51 changes: 25 additions & 26 deletions pyrcareworld/pyrcareworld/envs/base_env.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from gym.utils import seeding

from abc import ABC

import pyrcareworld
Expand All @@ -10,7 +8,8 @@
from pyrcareworld.rfuniverse_channel import AssetChannel
from pyrcareworld.rfuniverse_channel import InstanceChannel
from pyrcareworld.rfuniverse_channel import DebugChannel
import gym
import gymnasium as gym
from gymnasium.utils import seeding
import os

from pyrcareworld.agents import Robot
Expand Down Expand Up @@ -232,29 +231,29 @@ def close(self):
RCareWorldBaseEnv.close(self)


class RCareWorldGymGoalWrapper(gym.GoalEnv, RCareWorldBaseEnv):
def __init__(
self,
executable_file: str = None,
scene_file: str = None,
custom_channels: list = [],
assets: list = [],
**kwargs
):
RCareWorldBaseEnv.__init__(
self,
executable_file=executable_file,
scene_file=scene_file,
custom_channels=custom_channels,
assets=assets,
**kwargs,
)

def reset(self):
gym.GoalEnv.reset(self)

def close(self):
RCareWorldBaseEnv.close(self)
# class RCareWorldGymGoalWrapper(gym.GoalEnv, RCareWorldBaseEnv):
# def __init__(
# self,
# executable_file: str = None,
# scene_file: str = None,
# custom_channels: list = [],
# assets: list = [],
# **kwargs
# ):
# RCareWorldBaseEnv.__init__(
# self,
# executable_file=executable_file,
# scene_file=scene_file,
# custom_channels=custom_channels,
# assets=assets,
# **kwargs,
# )

# def reset(self):
# gym.GoalEnv.reset(self)

# def close(self):
# RCareWorldBaseEnv.close(self)


class RCareWorld(RCareWorldBaseEnv):
Expand Down

0 comments on commit 36fc717

Please sign in to comment.