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)
| 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. |