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)
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
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)
def Sh(*args, **prop): return shapes.Shape(list(args), Ident, **prop) # Small base and torso pr2BaseLink = Sh(\