Commit 0ec96f6c authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel

Clean Factory

parent a78007e7
......@@ -121,22 +121,9 @@ class Factory(GraphFactoryAbstract):
assert isinstance(aff, Affordance)
self.affordances [(aff.gripper, aff.handle)] = aff
def finalize (self, hppclient):
graph, elmts = hppclient.manipulation.graph.getGraph()
ids = { n.name: n.id for n in elmts.edges }
nids = { n.name: n.id for n in elmts.nodes }
self.transitionIds = { n.name: n.id for n in elmts.edges }
# self.supervisor.sots = { ids[n]: sot for n, sot in self.sots.items() if ids.has_key(n) }
# self.supervisor.grasps = { (gh, w): t for gh, ts in self.tasks._grasp.items() for w, t in ts.items() }
# self.supervisor.hpTasks = self.hpTasks
# self.supervisor.lpTasks = self.lpTasks
# self.supervisor.postActions = {
# ids[trans] : {
# nids[state]: sot for state, sot in values.items() if nids.has_key(state)
# } for trans, values in self.postActions.items() if ids.has_key(trans)
# }
# self.supervisor.preActions = { ids[trans] : sot for trans, sot in self.preActions.items() if ids.has_key(trans) }
def generate (self):
super(Factory, self).generate ()
self.supervisor.sots = self.sots
self.supervisor.grasps = { (gh, w): t for gh, ts in self.tasks._grasp.items() for w, t in ts.items() }
self.supervisor.hpTasks = self.hpTasks
......
Markdown is supported
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