1 from dynamic_graph
import plug
2 from dynamic_graph.sot.core.feature_visual_point
import FeatureVisualPoint
3 from dynamic_graph.sot.core.gain_adaptive
import GainAdaptive
5 from dynamic_graph.sot.core.op_point_modifier
import OpPointModifier
6 from dynamic_graph.sot.core.task
import Task
7 from dynamic_graph.sot.core.visual_point_projecter
import VisualPointProjecter
21 lambda x: x.getName().split(
":")[-1] == opPoint, self.
dyn.signals()
24 lambda x: x.getName().split(
":")[-1] ==
"J" + opPoint, self.
dyn.signals()
26 return len(sigsP) == 1 & len(sigsJ) == 1
58 self.
proj = VisualPointProjecter(
"proj" + self.
name)
63 plug(self.
proj.signal(
"point2D"), self.
feature.signal(
"xy"))
64 plug(self.
proj.signal(
"depth"), self.
feature.signal(
"Z"))
67 plug(self.
task.error, self.
gain.error)
68 plug(self.
gain.gain, self.
task.controlGain)
70 def __init__(self, name, dyn, opPoint, opPointRef="right-wrist"):
91 return self.
proj.point3D
95 self.
proj.point3D.value = m
106 if isinstance(m, bool)
and not m:
117 def goto3D(self, point3D, gain=None, ref2D=None, selec=None):
119 if ref2D
is not None:
121 if selec
is not None:
122 self.
feature.selec.value = selec