Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace DMControlViewer with built-in DM viewer #2163

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/garage/envs/dm_control/dm_control_env.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"""DM control environment."""
import akro
from dm_control import suite
from dm_control import viewer
from dm_control.rl.control import flatten_observation
from dm_env import StepType as dm_StepType
import numpy as np

from garage import Environment, EnvSpec, EnvStep, StepType
from garage.envs.dm_control.dm_control_viewer import DmControlViewer


def _flat_shape(observation):
Expand Down Expand Up @@ -180,14 +180,11 @@ def render(self, mode):
def visualize(self):
"""Creates a visualization of the environment."""
if not self._viewer:
title = 'dm_control {}'.format(self._name)
self._viewer = DmControlViewer(title=title)
self._viewer = viewer
self._viewer.launch(self._env)

def close(self):
"""Close the environment."""
if self._viewer:
self._viewer.close()
self._env.close()
self._viewer = None
self._env = None
Expand Down
55 changes: 0 additions & 55 deletions src/garage/envs/dm_control/dm_control_viewer.py

This file was deleted.