Пример #1
0
 def createTask(self, diag, gain, sampleInterval):
     self.task = TaskJointWeights(self.name)
     if (diag):
         self.task.setWeights(diag)
     else:
         self.dyn.signal('inertia').recompute(0)
         plug(self.dyn.signal('inertia'), self.task.signal('weights'))
     #plug(self.dyn.position,self.task.velocity)
     plug(self.robot.device.controlOut, self.task.velocity)
     self.task.controlGain.value = gain
     self.task.setSampleInterval(sampleInterval)
 def createTask(self,selec,diag,gain,sampleInterval):
     self.task = TaskJointWeights(self.name)
     self.task.setSize(self.robot.dimension)
     self.task.selec.value = selec
     if(diag):
         self.task.setWeights(diag)
     else:
         self.dyn.signal('inertia').recompute(0)
         plug(self.dyn.signal('inertia'),self.task.signal('weights'))
     self.task.controlGain.value = gain
     self.task.setSampleInterval(sampleInterval)
 def createTask(self,diag,gain,sampleInterval):
     self.task = TaskJointWeights(self.name)
     if(diag):
         self.task.setWeights(diag)
     else:
         self.dyn.signal('inertia').recompute(0)
         plug(self.dyn.signal('inertia'),self.task.signal('weights'))
     #plug(self.dyn.position,self.task.velocity)
     plug(self.robot.device.controlOut,self.task.velocity)
     self.task.controlGain.value = gain
     self.task.setSampleInterval(sampleInterval)
class MetaTaskJointWeights(object):
    name=''
    dyn=0
    robot=0
    task=0       
    def createTask(self,diag,gain,sampleInterval):
        self.task = TaskJointWeights(self.name)
        if(diag):
            self.task.setWeights(diag)
        else:
            self.dyn.signal('inertia').recompute(0)
            plug(self.dyn.signal('inertia'),self.task.signal('weights'))
        #plug(self.dyn.position,self.task.velocity)
        plug(self.robot.device.controlOut,self.task.velocity)
        self.task.controlGain.value = gain
        self.task.setSampleInterval(sampleInterval)
    def __init__(self,name,robot,diag=None,gain=1000000,sampleInterval=0):
        self.name = name
        self.dyn = robot.dynamic
        self.robot = robot
        self.createTask(diag,gain,sampleInterval)
Пример #5
0
class MetaTaskJointWeights(object):
    name = ''
    dyn = 0
    robot = 0
    task = 0

    def createTask(self, diag, gain, sampleInterval):
        self.task = TaskJointWeights(self.name)
        if (diag):
            self.task.setWeights(diag)
        else:
            self.dyn.signal('inertia').recompute(0)
            plug(self.dyn.signal('inertia'), self.task.signal('weights'))
        #plug(self.dyn.position,self.task.velocity)
        plug(self.robot.device.controlOut, self.task.velocity)
        self.task.controlGain.value = gain
        self.task.setSampleInterval(sampleInterval)

    def __init__(self, name, robot, diag=None, gain=1000000, sampleInterval=0):
        self.name = name
        self.dyn = robot.dynamic
        self.robot = robot
        self.createTask(diag, gain, sampleInterval)
class MetaTaskJointWeights(object):
    name=''
    dyn=0
    robot=0
    task=0       
    def createTask(self,selec,diag,gain,sampleInterval):
        self.task = TaskJointWeights(self.name)
        self.task.setSize(self.robot.dimension)
        self.task.selec.value = selec
        if(diag):
            self.task.setWeights(diag)
        else:
            self.dyn.signal('inertia').recompute(0)
            plug(self.dyn.signal('inertia'),self.task.signal('weights'))
        self.task.controlGain.value = gain
        self.task.setSampleInterval(sampleInterval)
    def __init__(self,name,selec,robot,diag=None,gain=1000,sampleInterval=0):
        self.name = name
        self.dyn = robot.dynamic
        self.robot = robot
        self.createTask(selec,diag,gain,sampleInterval)