1 from dynamic_graph
import plug
2 from dynamic_graph.sot.core
import FeatureGeneric, GainAdaptive, Task
3 from dynamic_graph.sot.core.matrix_util
import matrixToTuple
4 from dynamic_graph.sot.core.operator
import Selec_of_vector
5 from numpy
import identity
11 name =
"joint" + str(joint)
16 self.
feature = FeatureGeneric(
"feature" + name)
18 self.
gain = GainAdaptive(
"gain" + name)
20 self.
selec = Selec_of_vector(
"selec" + name)
22 plug(dyn.position, self.
selec.sin)
25 robotDim = len(dyn.position.value)
26 Id = identity(robotDim)
27 J = Id[joint : joint + 1]
28 self.
feature.jacobianIN.value = matrixToTuple(J)
32 self.task.add(self.
feature.name)
33 plug(self.task.error, self.
gain.error)
34 plug(self.
gain.gain, self.task.controlGain)
47 MetaTaskJoint.__init__(self, dyn, joint, name)