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

Method get_observable

dm_control/composer/entity.py:121–138  ·  view source on GitHub ↗

Returns the observable with the given name. Args: name: (str) The identifier of the observable. name_fully_qualified: (bool) Whether the provided name is prefixed by the model's full identifier.

(self, name, name_fully_qualified=False)

Source from the content-addressed store, hash-verified

119 return self._observables.copy()
120
121 def get_observable(self, name, name_fully_qualified=False):
122 """Returns the observable with the given name.
123
124 Args:
125 name: (str) The identifier of the observable.
126 name_fully_qualified: (bool) Whether the provided name is prefixed by the
127 model's full identifier.
128 """
129
130 if name_fully_qualified:
131 try:
132 model_identifier = self._entity.mjcf_model.full_identifier
133 except AttributeError as exc:
134 raise ValueError(
135 'Cannot retrieve the full identifier of mjcf_model.') from exc
136 return self._observables[name.replace(model_identifier, '')]
137 else:
138 return self._observables[name]
139
140 def set_options(self, options):
141 """Configure Observables with an options dict.

Callers

nothing calls this directly

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected