diff --git a/readme/get_started.md b/readme/get_started.md index 6291c7f..561e252 100644 --- a/readme/get_started.md +++ b/readme/get_started.md @@ -162,7 +162,7 @@ _(Instructions for TrackMania 2020)_ ```shell python -m tmrl --record-reward ``` - - If you are on Windows, press `e` to start recording _(on Linux, recording starts automatically)_ + - Wait for the recording to start (a message will be displayed in the terminal) - Complete the track - Check that your reward and environment work correctly: - Execute: diff --git a/readme/reference_guide.md b/readme/reference_guide.md index fb4816b..f7bbddd 100644 --- a/readme/reference_guide.md +++ b/readme/reference_guide.md @@ -122,7 +122,7 @@ All parameters are described below. python -m tmrl --test ``` -- Record a reward function in TrackMania. In Windows, press `e` to start recording. In Linux, recording starts automatically. You should start recording at the beginning of the track. The script will compute the reward function automatically when you cross the finish line: +- Record a reward function in TrackMania. You should start recording at the beginning of the track. The script will compute the reward function automatically when you cross the finish line: ```bash python -m tmrl --record-reward ``` diff --git a/setup.py b/setup.py index 49dc6f9..7badc75 100644 --- a/setup.py +++ b/setup.py @@ -137,13 +137,13 @@ def url_retrieve(url: str, outfile: Path, overwrite: bool = False): setup( name='tmrl', - version='0.6.3', + version='0.6.4', 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.6.3.tar.gz', + download_url='https://github.com/trackmania-rl/tmrl/archive/refs/tags/v0.6.4.tar.gz', author='Yann Bouteiller, Edouard Geze', author_email='yann.bouteiller@polymtl.ca, edouard.geze@hotmail.fr', license='MIT', diff --git a/tmrl/tools/record.py b/tmrl/tools/record.py index 7e82f8f..f7615e9 100644 --- a/tmrl/tools/record.py +++ b/tmrl/tools/record.py @@ -13,10 +13,6 @@ PATH_REWARD = cfg.REWARD_PATH DATASET_PATH = cfg.DATASET_PATH -SYSTEM = cfg.SYSTEM - -if SYSTEM == "Windows": - import keyboard def record_reward_dist(path_reward=PATH_REWARD): @@ -27,21 +23,13 @@ def record_reward_dist(path_reward=PATH_REWARD): is_recording = False while True: if not is_recording: - if SYSTEM == "Windows": - if keyboard.is_pressed('e'): - logging.info(f"start recording") - is_recording = True - else: - logging.info(f"start recording") - is_recording = True + logging.info(f"start recording") + is_recording = True if is_recording: data = client.retrieve_data(sleep_if_empty=0.01) # we need many points to build a smooth curve terminated = bool(data[8]) - if SYSTEM == "Windows": - early_stop = keyboard.is_pressed('q') - else: - early_stop = False + early_stop = False if early_stop or terminated: logging.info(f"Computing reward function checkpoints from captured positions...") logging.info(f"Initial number of captured positions: {len(positions)}")