From d7deb00c9b8933066e105c864100a49b8425f53a Mon Sep 17 00:00:00 2001 From: whikwon Date: Mon, 15 Apr 2019 19:27:50 +0900 Subject: [PATCH] Add max_episode_steps to env --- scripts/config/environment/open_manipulator.py | 1 + scripts/envs/open_manipulator/open_manipulator_reacher_env.py | 1 + 2 files changed, 2 insertions(+) diff --git a/scripts/config/environment/open_manipulator.py b/scripts/config/environment/open_manipulator.py index 0567007..0b31549 100755 --- a/scripts/config/environment/open_manipulator.py +++ b/scripts/config/environment/open_manipulator.py @@ -5,6 +5,7 @@ from geometry_msgs.msg import Quaternion config = { "ENV_NAME": "OpenManipulatorReacher", + "MAX_EPISODE_STEPS": 100, "TERM_COUNT": 10, "SUCCESS_COUNT": 10, "OVERHEAD_ORIENTATION": Quaternion( diff --git a/scripts/envs/open_manipulator/open_manipulator_reacher_env.py b/scripts/envs/open_manipulator/open_manipulator_reacher_env.py index 2891fb4..3853bd9 100755 --- a/scripts/envs/open_manipulator/open_manipulator_reacher_env.py +++ b/scripts/envs/open_manipulator/open_manipulator_reacher_env.py @@ -33,6 +33,7 @@ class OpenManipulatorReacherEnv(gym.Env): self.cfg = cfg self.env_name = self.cfg["ENV_NAME"] self.env_mode = self.cfg["ENV_MODE"] + self._max_episode_steps = self.cfg["MAX_EPISODE_STEPS"] self.reward_rescale_ratio = self.cfg["REWARD_RESCALE_RATIO"] self.reward_func = self.cfg["REWARD_FUNC"]