MCPcopy Create free account
hub / github.com/google-deepmind/dm_control / observables

Method observables

dm_control/composer/task.py:48–70  ·  view source on GitHub ↗

An OrderedDict of `control.Observable` instances for this task. Task subclasses should generally NOT override this property. This property is automatically computed by combining the observables dict provided by each `Entity` present in this task, and any additional observables retu

(self)

Source from the content-addressed store, hash-verified

46
47 @property
48 def observables(self):
49 """An OrderedDict of `control.Observable` instances for this task.
50
51 Task subclasses should generally NOT override this property.
52
53 This property is automatically computed by combining the observables dict
54 provided by each `Entity` present in this task, and any additional
55 observables returned via the `task_observables` property.
56
57 To provide an observable to an agent, the task code should either set
58 `enabled` property of an `Entity`-bound observable to `True`, or override
59 the `task_observables` property to provide additional observables not bound
60 to an `Entity`.
61
62 Returns:
63 An `collections.OrderedDict` mapping strings to instances of
64 `control.Observable`.
65 """
66 # Make a shallow copy of the OrderedDict, not the Observables themselves.
67 observables = copy.copy(self.task_observables)
68 for entity in self.root_entity.iter_entities():
69 observables.update(entity.observables.as_dict())
70 return observables
71
72 @property
73 def task_observables(self):

Callers

nothing calls this directly

Calls 4

copyMethod · 0.45
iter_entitiesMethod · 0.45
updateMethod · 0.45
as_dictMethod · 0.45

Tested by

no test coverage detected