Skip to content

Commit

Permalink
Rename mujoco env classes and files for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
hartikainen committed Feb 9, 2019
1 parent 6ea9149 commit 99e3498
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 5 deletions.
Empty file.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from .pusher_2d_env import Pusher2dEnv


class ImagePusherEnv(Pusher2dEnv):
class ImagePusher2dEnv(Pusher2dEnv):
def __init__(self, image_shape, *args, **kwargs):
self._Serializable__initialize(locals())
self.image_shape = image_shape
Expand All @@ -24,7 +24,7 @@ def _get_obs(self):
def step(self, action):
"""Step, computing reward from 'true' observations and not images."""

reward_observations = super(ImagePusherEnv, self)._get_obs()
reward_observations = super(ImagePusher2dEnv, self)._get_obs()
reward, info = self.compute_reward(reward_observations, action)

self.do_simulation(action, self.frame_skip)
Expand All @@ -43,7 +43,7 @@ def viewer_setup(self):
self.viewer.cam.trackbodyid = -1


class ImageForkReacherEnv(ImagePusherEnv):
class ImageForkReacher2dEnv(ImagePusher2dEnv):
def __init__(self,
arm_goal_distance_cost_coeff,
arm_object_distance_cost_coeff,
Expand All @@ -54,7 +54,7 @@ def __init__(self,
self._arm_goal_distance_cost_coeff = arm_goal_distance_cost_coeff
self._arm_object_distance_cost_coeff = arm_object_distance_cost_coeff

super(ImageForkReacherEnv, self).__init__(*args, **kwargs)
super(ImageForkReacher2dEnv, self).__init__(*args, **kwargs)

def compute_reward(self, observations, actions):
is_batch = True
Expand Down Expand Up @@ -135,7 +135,7 @@ def reset_model(self):
return self._get_obs()


class BlindForkReacherEnv(ImageForkReacherEnv):
class BlindForkReacher2dEnv(ImageForkReacher2dEnv):
def _get_obs(self):
return np.concatenate([
self.sim.data.qpos.flat[self.JOINT_INDS],
Expand Down

0 comments on commit 99e3498

Please sign in to comment.