Пример #1
0
 def __init__(self,space1,space2):
     assert isinstance(space1,StanceCSpace)
     assert isinstance(space2,StanceCSpace)
     if len(space1.holds) > len(space2.holds):
         space1,space2 = space2,space1
     self.space1,self.space2 = space1,space2
     ClosedLoopRobotCSpace.__init__(self,space1.robot,[h.ikConstraint for h in space2.holds],space2.collider)
     self.addFeasibilityTest(space1.testSupportPolygon,"suppPoly")
Пример #2
0
 def __init__(self, space1, space2):
     assert isinstance(space1, StanceCSpace)
     assert isinstance(space2, StanceCSpace)
     if len(space1.holds) > len(space2.holds):
         space1, space2 = space2, space1
     self.space1, self.space2 = space1, space2
     ClosedLoopRobotCSpace.__init__(self, space1.robot,
                                    [h.ikConstraint for h in space2.holds],
                                    space2.collider)
     self.addFeasibilityTest(space1.testSupportPolygon, "suppPoly")
Пример #3
0
    def __init__(self,robot,holds,collider=None,world=None,checkTorqueLimits=False):
        if collider is None and world is not None:
            ignoreCollisions = [robot.link(h.link) for h in holds]
            collider = collide.WorldCollider(world,ignore=ignoreCollisions)
        ClosedLoopRobotCSpace.__init__(self,robot,[h.ikConstraint for h in holds],collider)
        self.holds = holds
        self.gravity = (0,0,-9.8)

        sp = contact.supportPolygon(holds)
        #print "Support polygon",sp
        self.sp = sp
        self.equilibriumMargin = 0.0
        self.addFeasibilityTest(self.testSupportPolygon,"suppPoly")
        if checkTorqueLimits:
            raise NotImplementedError("Torque limit testing")
Пример #4
0
    def __init__(self,
                 robot,
                 holds,
                 collider=None,
                 world=None,
                 checkTorqueLimits=False):
        if collider is None and world is not None:
            ignoreCollisions = [robot.link(h.link) for h in holds]
            collider = collide.WorldCollider(world, ignore=ignoreCollisions)
        ClosedLoopRobotCSpace.__init__(self, robot,
                                       [h.ikConstraint for h in holds],
                                       collider)
        self.holds = holds
        self.gravity = (0, 0, -9.8)

        sp = contact.supportPolygon(holds)
        #print "Support polygon",sp
        self.sp = sp
        self.equilibriumMargin = 0.0
        self.addFeasibilityTest(self.testSupportPolygon, "suppPoly")
        if checkTorqueLimits:
            raise NotImplementedError("Torque limit testing")