Implementation:Google deepmind Dm control Manipulation Load
| Metadata | |
|---|---|
| Knowledge Sources | dm_control |
| Domains | Reinforcement Learning, Robotics Simulation, Environment Management |
| Last Updated | 2026-02-15 00:00 GMT |
Overview
Concrete tool for constructing a fully configured manipulation environment from a registered name using the dm_control.manipulation.load() entry point.
Description
The manipulation package (dm_control/manipulation/__init__.py) is the single entry point for all pre-built manipulation tasks. On import, it pulls in the four task modules (bricks, lift, place, reach), each of which registers its factory functions in the global registry. It then calls registry.done_importing_tasks() to enable safe hot-reloading.
The module exposes two top-level constants:
ALL-- a tuple of all registered environment names.TAGS-- a tuple of all registered tag strings.
The load() function performs the following steps:
- Looks up the environment name in the registry via
registry.get_constructor(environment_name). - Calls the returned factory with no arguments to produce a
composer.Taskinstance. - Wraps the task in a
composer.Environmentwith a time limit of 10 seconds (or infinite if the--timeoutflag is set toFalse) and the supplied random seed.
The time-limit logic is controlled by the _get_timeout() helper, which reads the --timeout abseil flag (defaulting to True) and caches the result.
Usage
This is the standard way to create a manipulation environment. Training loops, evaluation scripts, and the interactive viewer all call manipulation.load().
Code Reference
| Attribute | Value |
|---|---|
| Source Location | dm_control/manipulation/__init__.py, lines 61--76
|
| Signature | load(environment_name: str, seed: int = None) -> composer.Environment
|
| Import | from dm_control import manipulation
|
I/O Contract
Inputs
| Parameter | Type | Required | Description |
|---|---|---|---|
environment_name |
str |
Yes | A name present in manipulation.ALL, e.g. 'reach_site_features' or 'lift_brick_vision'.
|
seed |
int or None |
No | An integer seed for the environment's random number generator. None causes self-seeding from platform entropy.
|
Outputs
| Return Type | Description |
|---|---|
composer.Environment |
A dm_env-compatible environment with reset(), step(action), observation_spec(), and action_spec() methods. Time limit is 10 seconds by default.
|
Usage Examples
from dm_control import manipulation
import numpy as np
# List all available environments.
print(manipulation.ALL)
# Load an environment by name with a fixed seed for reproducibility.
env = manipulation.load('reach_site_features', seed=42)
# Inspect the action and observation specs.
action_spec = env.action_spec()
obs_spec = env.observation_spec()
print('Action shape:', action_spec.shape)
print('Observation keys:', list(obs_spec.keys()))
# Run a single episode with random actions.
timestep = env.reset()
while not timestep.last():
action = np.random.uniform(
action_spec.minimum, action_spec.maximum, size=action_spec.shape)
timestep = env.step(action)
print('Reward:', timestep.reward)
from dm_control import manipulation
# Load a vision-based task (observations include camera pixels).
env = manipulation.load('reach_duplo_vision', seed=0)
timestep = env.reset()
print('Observation keys:', list(timestep.observation.keys()))
# Includes a camera observation key with pixel data.