garage.envs.dm_control.dm_control_env

DM control environment.

class DMControlEnv(env, name=None)

Bases: garage.Environment

Inheritance diagram of garage.envs.dm_control.dm_control_env.DMControlEnv

Binding for dm_control <https://arxiv.org/pdf/1801.00690.pdf>.

property action_space

The action space specification.

Type

akro.Space

property observation_space

The observation space specification.

Type

akro.Space

property spec

The environment specification.

Type

EnvSpec

property render_modes

A list of string representing the supported render modes.

Type

list

classmethod from_suite(domain_name, task_name)

Create a DmControl task given the domain name and task name.

Parameters
  • domain_name (str) – Domain name

  • task_name (str) – Task name

Returns

the dm_control task environment

Return type

dm_control.suite.Task

reset()

Resets the environment.

Returns

The first observation conforming to

observation_space.

dict: The episode-level information.

Note that this is not part of env_info provided in step(). It contains information of he entire episode, which could be needed to determine the first action (e.g. in the case of goal-conditioned or MTRL.)

Return type

numpy.ndarray

step(action)

Steps the environment with the action and returns a EnvStep.

Parameters

action (object) – input action

Returns

The environment step resulting from the action.

Return type

EnvStep

Raises

RuntimeError – if step() is called after the environment has been constructed and reset() has not been called.

render(mode)

Render the environment.

Parameters

mode (str) – render mode.

Returns

if mode is ‘rgb_array’, else return None.

Return type

np.ndarray

Raises

ValueError – if mode is not supported.

visualize()

Creates a visualization of the environment.

close()

Close the environment.