Commit bae0523d authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Remove useless functions.

parent 4a11d0d3
from hpp.corbaserver.manipulation.constraint_graph_factory import ConstraintFactoryAbstract, GraphFactoryAbstract
from tools import Manifold, Grasp, idx, idx_zip, OpFrame, EEPosture
from tools import Manifold, Grasp, OpFrame, EEPosture
from dynamic_graph.sot.core import SOT
class Affordance(object):
......@@ -94,7 +94,7 @@ class Factory(GraphFactoryAbstract):
objectsAlreadyGrasped = {}
for ig, ih in idx_zip (grasps):
for ig, ih in enumerate(grasps):
if ih is not None:
# Add task gripper_close
self.manifold += tasks.g (factory.grippers[ig], factory.handles[ih], 'gripper_close')
......@@ -140,8 +140,8 @@ class Factory(GraphFactoryAbstract):
def setupFrames (self, hppclient, sotrobot):
self.sotrobot = sotrobot
self.grippersIdx = { self.grippers[i] : i for i in idx(self.grippers) }
self.handlesIdx = { self.handles[i] : i for i in idx(self.handles) }
self.grippersIdx = { g: i for i,g in enumerate(self.grippers) }
self.handlesIdx = { h: i for i,h in enumerate(self.handles) }
self.gripperFrames = { g: OpFrame(hppclient) for g in self.grippers }
self.handleFrames = { h: OpFrame(hppclient) for h in self.handles }
from tools import Grasp, OpFrame, Manifold, Posture, idx, idx_zip
from tools import Manifold, Posture
from dynamic_graph.sot.core import SOT
from dynamic_graph import plug
......@@ -5,9 +5,6 @@ from dynamic_graph.sot.core.meta_task_posture import MetaTaskKinePosture
from dynamic_graph.sot.core.meta_tasks import setGain
from dynamic_graph.sot.core import FeaturePosture
def idx(l): return range(len(l))
def idx_zip (l): return zip (idx(l), l)
def parseHppName (hppjointname):
if hppjointname == "universe": return "", "universe"
return hppjointname.split('/', 1)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment