Esempio n. 1
0
 def armAndGripperShape(self, c, hand, attached):
     parts = dict([(o.name(), o) for o in c.placement(attached=attached).parts()])
     armShapes = [parts[self.armChainNames[hand]],
                  parts[self.gripperChainNames[hand]]]
     if attached and attached[hand]:
         armShapes.append(parts[attached[hand].name()])
     return shapes.Shape(armShapes, None)
Esempio n. 2
0
 def placement(self, conf, getShapes=True, attached=None):
     place, attachedParts, trans = self.placementAux(conf, getShapes, attached)
     if attached and getShapes and any(attached.values()):
         return shapes.Shape(place.parts() + [x for x in attachedParts.values() if x],
                             place.origin(),
                             name=place.name()), trans
     else:
         return place, trans
Esempio n. 3
0
 def armShape(self, c, hand):
     parts = dict([(o.name(), o) for o in c.placement().parts()])
     armShapes = [parts[self.armChainNames[hand]]]
     return shapes.Shape(armShapes, None)
Esempio n. 4
0
def Sh(*args, **prop): return shapes.Shape(list(args), Ident, **prop)

# Small base and torso
pr2BaseLink = Sh(\