Esempio n. 1
0
 def MarkComponent(self, component_name, color='red'):
     '''Change the color of a component to identify it during simulation. \nUse 'red', 'blue' or 'green'.'''
     if MiroAPI.API == 'PyChrono':
         if color != 'blue' and color != 'green':
             color = 'red'
         MiroAPI.ChangeBodyTexture(
             self.components[component_name].GetBody(),
             'textures/markpattern_' + color + '.png')
     else:
         print(
             'MarkComponent is currently only supported in the chrono API')
Esempio n. 2
0
 def SetTexture(self, texture_file, scale=[4, 3]):
     MiroAPI.ChangeBodyTexture(self.body, texture_file, scale)