Skip to content

Commit

Permalink
rtgym >= 0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbouteiller committed Mar 24, 2023
1 parent 41f8a13 commit 7fc88de
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions readme/tuto_library.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ class DummyRCDroneInterface(RealTimeGymInterface):
vel_y = control[1]
self.rc_drone.send_control(vel_x, vel_y)

def reset(self):
def reset(self, seed=None, options=None):
if not self.initialized:
self.rc_drone = DummyRCDrone()
self.initialized = True
Expand All @@ -240,7 +240,7 @@ class DummyRCDroneInterface(RealTimeGymInterface):
return obs, rew, terminated, info

def wait(self):
self.send_control(self.get_default_action())
pass

def render(self):
image = self.blank_image.copy()
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def url_retrieve(url: str, outfile: Path, overwrite: bool = False):
'torch',
'pandas',
'gymnasium',
'rtgym>=0.8',
'rtgym>=0.9',
'pyyaml',
'wandb',
'requests',
Expand All @@ -127,13 +127,13 @@ def url_retrieve(url: str, outfile: Path, overwrite: bool = False):

setup(
name='tmrl',
version='0.5.0',
version='0.5.1',
description='Network-based framework for real-time robot learning',
long_description=README,
long_description_content_type='text/markdown',
keywords='reinforcement learning, robot learning, trackmania, self driving, roborace',
url='https://github.com/trackmania-rl/tmrl',
download_url='https://github.com/trackmania-rl/tmrl/archive/refs/tags/v0.4.2.tar.gz',
download_url='https://github.com/trackmania-rl/tmrl/archive/refs/tags/v0.5.1.tar.gz',
author='Yann Bouteiller, Edouard Geze',
author_email='[email protected], [email protected]',
license='MIT',
Expand Down
6 changes: 3 additions & 3 deletions tmrl/custom/custom_gym_interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def reset_common(self):
time_sleep = max(0, cfg.SLEEP_TIME_AT_RESET - 0.1) if self.gamepad else cfg.SLEEP_TIME_AT_RESET
time.sleep(time_sleep) # must be long enough for image to be refreshed

def reset(self):
def reset(self, seed=None, options=None):
"""
obs must be a list of numpy arrays
"""
Expand Down Expand Up @@ -268,7 +268,7 @@ def initialize(self):
self.lidar = Lidar(self.window_interface.screenshot())
self.initialized = True

def reset(self):
def reset(self, seed=None, options=None):
"""
obs must be a list of numpy arrays
"""
Expand Down Expand Up @@ -316,7 +316,7 @@ def get_observation_space(self):

class TM2020InterfaceLidarProgress(TM2020InterfaceLidar):

def reset(self):
def reset(self, seed=None, options=None):
"""
obs must be a list of numpy arrays
"""
Expand Down
4 changes: 2 additions & 2 deletions tmrl/tuto/tuto.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def send_control(self, control):
vel_y = control[1]
self.rc_drone.send_control(vel_x, vel_y)

def reset(self):
def reset(self, seed=None, options=None):
if not self.initialized:
self.rc_drone = DummyRCDrone()
self.rendering_thread.start()
Expand All @@ -102,7 +102,7 @@ def get_obs_rew_terminated_info(self):
return obs, rew, terminated, info

def wait(self):
self.send_control(self.get_default_action())
pass

def render(self):
image = self.blank_image.copy()
Expand Down

0 comments on commit 7fc88de

Please sign in to comment.