manipulation.constraint_graph_factory.GraphFactoryAbstract Class Reference

An abstract class which is loops over the different (gripper, handle) associations. More...

Inheritance diagram for manipulation.constraint_graph_factory.GraphFactoryAbstract:
[legend]

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...
 

Detailed Description

An abstract class which is loops over the different (gripper, handle) associations.

The behaviour can be tuned by setting the callback functions:

Constructor & Destructor Documentation

def manipulation.constraint_graph_factory.GraphFactoryAbstract.__init__ (   self)

Member Function Documentation

def manipulation.constraint_graph_factory.GraphFactoryAbstract.environmentContacts (   self,
  envContacts 
)
Parameters
envContactscontact on the environment to be considered.

References manipulation.constraint_graph_factory.GraphFactoryAbstract.envContacts.

def manipulation.constraint_graph_factory.GraphFactoryAbstract.generate (   self)
def manipulation.constraint_graph_factory.GraphFactoryAbstract.makeLoopTransition (   self,
  state 
)

Create a loop transition.

Parameters
statean 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.

Parameters
graspsa handle index for each gripper, as in GraphFactoryAbstract.graspIsAllowed.
prioritythe state priority.
Returns
an object representing the state.

Referenced by manipulation.constraint_graph_factory.GraphFactoryAbstract.makeTransition().

def manipulation.constraint_graph_factory.GraphFactoryAbstract.makeTransition (   self,
  stateFrom,
  stateTo,
  ig 
)
def manipulation.constraint_graph_factory.GraphFactoryAbstract.setGrippers (   self,
  grippers 
)
def manipulation.constraint_graph_factory.GraphFactoryAbstract.setObjects (   self,
  objects,
  handlesPerObjects,
  contactsPerObjects 
)

Member Data Documentation

manipulation.constraint_graph_factory.GraphFactoryAbstract.contactsPerObjects
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:

1 lambda x : True

Referenced by manipulation.constraint_graph_factory.GraphFactoryAbstract.makeTransition(), and manipulation.constraint_graph_factory.GraphFactoryAbstract.setRules().

manipulation.constraint_graph_factory.GraphFactoryAbstract.handlesPerObjects
manipulation.constraint_graph_factory.GraphFactoryAbstract.objects
manipulation.constraint_graph_factory.GraphFactoryAbstract.states
manipulation.constraint_graph_factory.GraphFactoryAbstract.transitions