An abstract class which is loops over the different (gripper, handle) associations. More...
Public Member Functions | |
def | __init__ (self) |
Main API | |
def | setGrippers (self, grippers) |
def | setObjects (self, objects, handlesPerObjects, contactsPerObjects) |
def | environmentContacts (self, envContacts) |
def | setRules (self, rules) |
Set the function graspIsAllowed. More... | |
def | generate (self) |
Go through the combinatorial defined by the grippers and handles and create the states and transitions. More... | |
Abstract methods of the algorithm | |
def | makeState (self, grasps, priority) |
Create a new state. More... | |
def | makeLoopTransition (self, state) |
Create a loop transition. More... | |
def | makeTransition (self, stateFrom, stateTo, ig) |
Create two transitions between two different states. More... | |
Public Attributes | |
graspIsAllowed | |
Reduces the problem combinatorial. More... | |
Internal variables | |
states | |
transitions | |
handles | |
the handle names More... | |
grippers | |
the gripper names More... | |
envContacts | |
the names of contact on the environment More... | |
objects | |
the object names More... | |
handlesPerObjects | |
See setObjects. More... | |
objectFromHandle | |
See setObjects. More... | |
contactsPerObjects | |
See setObjects. More... | |
An abstract class which is loops over the different (gripper, handle) associations.
The behaviour can be tuned by setting the callback functions:
def manipulation.constraint_graph_factory.GraphFactoryAbstract.__init__ | ( | self | ) |
def manipulation.constraint_graph_factory.GraphFactoryAbstract.environmentContacts | ( | self, | |
envContacts | |||
) |
envContacts | contact on the environment to be considered. |
References manipulation.constraint_graph_factory.GraphFactoryAbstract.envContacts.
def manipulation.constraint_graph_factory.GraphFactoryAbstract.generate | ( | self | ) |
Go through the combinatorial defined by the grippers and handles and create the states and transitions.
References manipulation.constraint_graph_factory.GraphFactoryAbstract._recurse(), hpp::manipulation::Device.grippers, hpp::corbaserver::manipulation::Rule.grippers, manipulation.constraint_graph_factory.GraphFactoryAbstract.grippers, hpp::manipulation::Device.handles, hpp::manipulation::graph::helper::ObjectDef_t.handles, hpp::corbaserver::manipulation::Rule.handles, manipulation.constraint_graph_factory.Rules.handles, and manipulation.constraint_graph_factory.GraphFactoryAbstract.handles.
def manipulation.constraint_graph_factory.GraphFactoryAbstract.makeLoopTransition | ( | self, | |
state | |||
) |
Create a loop transition.
state | an object returned by makeState which represent the state |
Referenced by manipulation.constraint_graph_factory.GraphFactoryAbstract.makeTransition().
def manipulation.constraint_graph_factory.GraphFactoryAbstract.makeState | ( | self, | |
grasps, | |||
priority | |||
) |
Create a new state.
grasps | a handle index for each gripper, as in GraphFactoryAbstract.graspIsAllowed. |
priority | the state priority. |
Referenced by manipulation.constraint_graph_factory.GraphFactoryAbstract.makeTransition().
def manipulation.constraint_graph_factory.GraphFactoryAbstract.makeTransition | ( | self, | |
stateFrom, | |||
stateTo, | |||
ig | |||
) |
Create two transitions between two different states.
stateFrom | same as grasps in makeState |
stateTo | same as grasps in makeState |
ig | index if the grasp vector that changes, i.e. such that |
References manipulation.constraint_graph_factory.GraphFactoryAbstract._makeState(), manipulation.constraint_graph_factory.GraphFactoryAbstract._recurse(), manipulation.constraint_graph_factory.GraphFactoryAbstract._stateName(), manipulation.constraint_graph_factory.GraphFactoryAbstract.graspIsAllowed, hpp::manipulation::Device.grippers, hpp::corbaserver::manipulation::Rule.grippers, manipulation.constraint_graph_factory.GraphFactoryAbstract.grippers, hpp::manipulation::Device.handles, hpp::manipulation::graph::helper::ObjectDef_t.handles, hpp::corbaserver::manipulation::Rule.handles, manipulation.constraint_graph_factory.Rules.handles, manipulation.constraint_graph_factory.GraphFactoryAbstract.handles, manipulation.constraint_graph_factory.GraphFactoryAbstract.handlesPerObjects, manipulation.constraint_graph_factory.GraphFactoryAbstract.makeLoopTransition(), manipulation.constraint_graph_factory.GraphFactoryAbstract.makeState(), manipulation.constraint_graph_factory.GraphFactoryAbstract.makeTransition(), and manipulation.constraint_graph_factory.GraphFactoryAbstract.states.
Referenced by manipulation.constraint_graph_factory.GraphFactoryAbstract.makeTransition().
def manipulation.constraint_graph_factory.GraphFactoryAbstract.setGrippers | ( | self, | |
grippers | |||
) |
grippers | list of gripper names to be considered |
References hpp::manipulation::Device.grippers, hpp::corbaserver::manipulation::Rule.grippers, and manipulation.constraint_graph_factory.GraphFactoryAbstract.grippers.
def manipulation.constraint_graph_factory.GraphFactoryAbstract.setObjects | ( | self, | |
objects, | |||
handlesPerObjects, | |||
contactsPerObjects | |||
) |
objects | list of object names to be considered |
handlesPerObjects | a list of list of handle names. |
contactsPerObjects | a list of list of contact names. handlesPerObjects and contactsPerObjects must have one list for each object, in the same order. |
References manipulation.constraint_graph_factory.GraphFactoryAbstract.contactsPerObjects, hpp::manipulation::Device.handles, hpp::manipulation::graph::helper::ObjectDef_t.handles, hpp::corbaserver::manipulation::Rule.handles, manipulation.constraint_graph_factory.Rules.handles, manipulation.constraint_graph_factory.GraphFactoryAbstract.handles, manipulation.constraint_graph_factory.GraphFactoryAbstract.handlesPerObjects, manipulation.constraint_graph_factory.GraphFactoryAbstract.objectFromHandle, and manipulation.constraint_graph_factory.GraphFactoryAbstract.objects.
def manipulation.constraint_graph_factory.GraphFactoryAbstract.setRules | ( | self, | |
rules | |||
) |
Set the function graspIsAllowed.
rules | a list of Rule objects |
References manipulation.constraint_graph_factory.GraphFactoryAbstract.graspIsAllowed, hpp::manipulation::Device.grippers, hpp::corbaserver::manipulation::Rule.grippers, manipulation.constraint_graph_factory.GraphFactoryAbstract.grippers, hpp::manipulation::Device.handles, hpp::manipulation::graph::helper::ObjectDef_t.handles, hpp::corbaserver::manipulation::Rule.handles, manipulation.constraint_graph_factory.Rules.handles, and manipulation.constraint_graph_factory.GraphFactoryAbstract.handles.
manipulation.constraint_graph_factory.GraphFactoryAbstract.contactsPerObjects |
See setObjects.
Referenced by manipulation.constraint_graph_factory.GraphFactoryAbstract.setObjects().
manipulation.constraint_graph_factory.GraphFactoryAbstract.envContacts |
the names of contact on the environment
Referenced by manipulation.constraint_graph_factory.GraphFactoryAbstract.environmentContacts().
manipulation.constraint_graph_factory.GraphFactoryAbstract.graspIsAllowed |
Reduces the problem combinatorial.
Function called to check whether a grasps is allowed. It takes as input a list of handle indices (or None) such that i-th grippers grasps grasps[i]
-th handles. It must return a boolean
It defaults to:
Referenced by manipulation.constraint_graph_factory.GraphFactoryAbstract.makeTransition(), and manipulation.constraint_graph_factory.GraphFactoryAbstract.setRules().
manipulation.constraint_graph_factory.GraphFactoryAbstract.grippers |
the gripper names
Referenced by manipulation.constraint_graph_factory.GraphFactoryAbstract.generate(), manipulation.constraint_graph_factory.GraphFactoryAbstract.makeTransition(), manipulation.constraint_graph_factory.GraphFactoryAbstract.setGrippers(), and manipulation.constraint_graph_factory.GraphFactoryAbstract.setRules().
manipulation.constraint_graph_factory.GraphFactoryAbstract.handles |
the handle names
Referenced by manipulation.constraint_graph_factory.GraphFactoryAbstract.generate(), manipulation.constraint_graph_factory.GraphFactoryAbstract.makeTransition(), manipulation.constraint_graph_factory.GraphFactoryAbstract.setObjects(), and manipulation.constraint_graph_factory.GraphFactoryAbstract.setRules().
manipulation.constraint_graph_factory.GraphFactoryAbstract.handlesPerObjects |
manipulation.constraint_graph_factory.GraphFactoryAbstract.objectFromHandle |
manipulation.constraint_graph_factory.GraphFactoryAbstract.objects |
the object names
Referenced by manipulation.constraint_graph_factory.ConstraintGraphFactory.makeTransition(), and manipulation.constraint_graph_factory.GraphFactoryAbstract.setObjects().
manipulation.constraint_graph_factory.GraphFactoryAbstract.states |
manipulation.constraint_graph_factory.GraphFactoryAbstract.transitions |