Exemplo n.º 1
0
 def generate_name(self, name_indexes):
     if self.name is None:
         if self.model_path.split("/")[0] == "robot":
             assert self.name is None or self.name == "robot", \
                 "Detected robot XML. " \
                 "Robot should be named \"robot\". Abording."
             name = "robot"
         else:
             name = self.model_path.replace('/', '_')
         self.name = get_name_index(name_indexes, name)
Exemplo n.º 2
0
 def generate_name(self, name_indexes):
     if not hasattr(self, "name") or self.name is None:
         classname = self.__class__.__module__.split(".")[-1]
         self.name = get_name_index(name_indexes, classname)