From 6169ede44943ee6f6c5f037aa3f0c648963a1cfe Mon Sep 17 00:00:00 2001 From: ottofabian Date: Tue, 18 May 2021 10:50:30 +0200 Subject: [PATCH] removed episodic_simple_reacher.py --- alr_envs/classic_control/__init__.py | 1 - .../episodic_simple_reacher.py | 46 ------------------- 2 files changed, 47 deletions(-) delete mode 100644 alr_envs/classic_control/episodic_simple_reacher.py diff --git a/alr_envs/classic_control/__init__.py b/alr_envs/classic_control/__init__.py index fde30fc..4a26eaa 100644 --- a/alr_envs/classic_control/__init__.py +++ b/alr_envs/classic_control/__init__.py @@ -1,4 +1,3 @@ from alr_envs.classic_control.simple_reacher import SimpleReacherEnv -from alr_envs.classic_control.episodic_simple_reacher import EpisodicSimpleReacherEnv from alr_envs.classic_control.viapoint_reacher import ViaPointReacher from alr_envs.classic_control.hole_reacher import HoleReacherEnv diff --git a/alr_envs/classic_control/episodic_simple_reacher.py b/alr_envs/classic_control/episodic_simple_reacher.py deleted file mode 100644 index ed498ce..0000000 --- a/alr_envs/classic_control/episodic_simple_reacher.py +++ /dev/null @@ -1,46 +0,0 @@ -from alr_envs.classic_control.simple_reacher import SimpleReacherEnv -from gym import spaces -import numpy as np - - -class EpisodicSimpleReacherEnv(SimpleReacherEnv): - def __init__(self, n_links, random_start=True): - super(EpisodicSimpleReacherEnv, self).__init__(n_links, random_start) - - # self._goal_pos = None - - if random_start: - state_bound = np.hstack([ - [np.pi] * self.n_links, # cos - [np.pi] * self.n_links, # sin - [np.inf] * self.n_links, # velocity - ]) - else: - state_bound = np.empty(0, ) - - state_bound = np.hstack([ - state_bound, - [np.inf] * 2, # x-y coordinates of goal - ]) - - self.observation_space = spaces.Box(low=-state_bound, high=state_bound, shape=state_bound.shape) - - @property - def init_qpos(self): - return self._start_pos - - # @property - # def goal_pos(self): - # return self._goal_pos - - def _get_obs(self): - if self.random_start: - theta = self._joint_angles - return np.hstack([ - np.cos(theta), - np.sin(theta), - self._angle_velocity, - self._goal, - ]) - else: - return self._goal