(self)
return element_id
The ID number of this element within MuJoCo's data structures.
The ID number of this element within MuJoCo's data structures.
The ID number of this element within MuJoCo s data structures .
def element_id(self):
    """The ID number of this element within MuJoCo's data structures."""
    try:
      element_id = self._getattr_cache['element_id']
    except KeyError:
      if isinstance(self._named_index, list):
        element_id = np.array(
            [self._physics.model.name2id(item_name, self._namespace)
             for item_name in self._named_index])
        element_id.flags.writeable = False
      else:
        element_id = self._physics.model.name2id(
            self._named_index, self._namespace)
      self._getattr_cache['element_id'] = element_id
    return element_id
def element_id ( self ) : try : element_id = self . _getattr_cache [ 'element_id' ] except KeyError : if isinstance ( self . _named_index , list ) : element_id = np . array ( [ self . _physics . model . name2id ( item_name , self . _namespace ) for item_name in self . _named_index ] ) element_id . flags . writeable = False else : element_id = self . _physics . model . name2id ( self . _named_index , self . _namespace ) self . _getattr_cache [ 'element_id' ] = element_id return element_id