From 02102ed5198645eaa1a2a8b9f31c129fed9084ba Mon Sep 17 00:00:00 2001 From: Maxime Ellerbach Date: Sat, 24 Jul 2021 22:22:46 +0200 Subject: [PATCH] added circuit launch track --- README.md | 1 + examples/genetic_alg/simple_gen_driver.py | 1 + examples/gym_test.py | 1 + examples/reinforcement_learning/ddqn.py | 1 + examples/reinforcement_learning/ppo_train.py | 1 + examples/test_cam_config.py | 1 + gym_donkeycar/__init__.py | 3 +++ gym_donkeycar/envs/donkey_env.py | 5 +++++ tests/test_gym_donkeycar.py | 1 + 9 files changed, 15 insertions(+) diff --git a/README.md b/README.md index e15b3954f..9640bbdcc 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,7 @@ Example info: - "donkey-minimonaco-track-v0" - "donkey-warren-track-v0" - "donkey-thunderhill-track-v0" +- "donkey-circuit-launch-track-v0" ## Codestyle diff --git a/examples/genetic_alg/simple_gen_driver.py b/examples/genetic_alg/simple_gen_driver.py index ca1dda971..c65b18528 100755 --- a/examples/genetic_alg/simple_gen_driver.py +++ b/examples/genetic_alg/simple_gen_driver.py @@ -192,6 +192,7 @@ def on_agents_finished(self): "donkey-minimonaco-track-v0", "donkey-warren-track-v0", "donkey-thunderhill-track-v0", + "donkey-circuit-launch-track-v0", ] parser = argparse.ArgumentParser(description="simple_gen_driver") diff --git a/examples/gym_test.py b/examples/gym_test.py index 0ca1b152a..6eecade19 100755 --- a/examples/gym_test.py +++ b/examples/gym_test.py @@ -71,6 +71,7 @@ def exit_scene(env): "donkey-minimonaco-track-v0", "donkey-warren-track-v0", "donkey-thunderhill-track-v0", + "donkey-circuit-launch-track-v0", ] parser = argparse.ArgumentParser(description="gym_test") diff --git a/examples/reinforcement_learning/ddqn.py b/examples/reinforcement_learning/ddqn.py index 4bb4bd100..87c74f00a 100755 --- a/examples/reinforcement_learning/ddqn.py +++ b/examples/reinforcement_learning/ddqn.py @@ -340,6 +340,7 @@ def signal_handler(signal, frame): "donkey-minimonaco-track-v0", "donkey-warren-track-v0", "donkey-thunderhill-track-v0", + "donkey-circuit-launch-track-v0", ] parser = argparse.ArgumentParser(description="ddqn") diff --git a/examples/reinforcement_learning/ppo_train.py b/examples/reinforcement_learning/ppo_train.py index 8a38efda5..edf4a2fc6 100644 --- a/examples/reinforcement_learning/ppo_train.py +++ b/examples/reinforcement_learning/ppo_train.py @@ -49,6 +49,7 @@ def _init(): "donkey-minimonaco-track-v0", "donkey-warren-track-v0", "donkey-thunderhill-track-v0", + "donkey-circuit-launch-track-v0", ] parser = argparse.ArgumentParser(description="ppo_train") diff --git a/examples/test_cam_config.py b/examples/test_cam_config.py index 43dbc37e2..0eddfa3b4 100644 --- a/examples/test_cam_config.py +++ b/examples/test_cam_config.py @@ -20,6 +20,7 @@ "donkey-minimonaco-track-v0", "donkey-warren-track-v0", "donkey-thunderhill-track-v0", + "donkey-circuit-launch-track-v0", ] parser = argparse.ArgumentParser(description="gym_test") diff --git a/gym_donkeycar/__init__.py b/gym_donkeycar/__init__.py index 84b28e612..bace1796b 100644 --- a/gym_donkeycar/__init__.py +++ b/gym_donkeycar/__init__.py @@ -7,6 +7,7 @@ from gym_donkeycar.envs.donkey_env import ( AvcSparkfunEnv, + CircuitLaunchEnv, GeneratedRoadsEnv, GeneratedTrackEnv, MiniMonacoEnv, @@ -46,3 +47,5 @@ register(id="donkey-warren-track-v0", entry_point="gym_donkeycar.envs.donkey_env:WarrenTrackEnv") register(id="donkey-thunderhill-track-v0", entry_point="gym_donkeycar.envs.donkey_env:ThunderhillTrackEnv") + +register(id="donkey-circuit-launch-track-v0", entry_point="gym_donkeycar.envs.donkey_env:CircuitLaunchEnv") diff --git a/gym_donkeycar/envs/donkey_env.py b/gym_donkeycar/envs/donkey_env.py index c9f7223a7..ab732e914 100755 --- a/gym_donkeycar/envs/donkey_env.py +++ b/gym_donkeycar/envs/donkey_env.py @@ -191,3 +191,8 @@ def __init__(self, *args, **kwargs): class ThunderhillTrackEnv(DonkeyEnv): def __init__(self, *args, **kwargs): super(ThunderhillTrackEnv, self).__init__(level="thunderhill", *args, **kwargs) + + +class CircuitLaunchEnv(DonkeyEnv): + def __init__(self, *args, **kwargs): + super(CircuitLaunchEnv, self).__init__(level="circuit_launch", *args, **kwargs) diff --git a/tests/test_gym_donkeycar.py b/tests/test_gym_donkeycar.py index d9494952b..527bcfd27 100644 --- a/tests/test_gym_donkeycar.py +++ b/tests/test_gym_donkeycar.py @@ -15,6 +15,7 @@ "donkey-minimonaco-track-v0", "donkey-warren-track-v0", "donkey-thunderhill-track-v0", + "donkey-circuit-launch-track-v0", ]