hpp-manipulation-corba  4.15.1
Corba server for manipulation planning
manipulation.constraint_graph_factory.GraphFactoryAbstract Class Reference
Inheritance diagram for manipulation.constraint_graph_factory.GraphFactoryAbstract:
Collaboration diagram for manipulation.constraint_graph_factory.GraphFactoryAbstract:

Public Member Functions

def __init__ (self)
 
def setGrippers (self, grippers)
 
def setObjects (self, objects, handlesPerObjects, contactsPerObjects)
 
def environmentContacts (self, envContacts)
 
def setRules (self, rules)
 
def generate (self)
 
def makeState (self, grasps, priority)
 
def makeLoopTransition (self, state)
 
def transitionIsAllowed (self, stateFrom, stateTo)
 
def makeTransition (self, stateFrom, stateTo, ig)
 

Public Attributes

 graspIsAllowed
 
 states
 
 transitions
 
 handles
 
 grippers
 
 envContacts
 
 objects
 
 handlesPerObjects
 
 objectFromHandle
 
 contactsPerObjects
 

Detailed Description

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

The behaviour can be tuned by setting the callback functions:
- \\ref graspIsAllowed (redundant with \\ref setRules)
- \\ref constraint_graph_factory_algo_callbacks "Algorithm steps"

<b>Sketch of the algorithm</b>

Let
 \\li \\f$G\\f$ be the set of grippers,
 \\li \\f$H\\f$ be the set of handles.

 A \b grasp is defined as a pair \\f$(g,h)\\in G\\times H\\f$.

 Each \b state (excluding waypoint states) is defined by a set of grasps.
 Given a set of grasps, we define
 \\li <b>available grippers</b> as the grippers that are not the first
     element of any pair of the set of grasps,
 \\li <b>available handles</b> as the handles that are not the second element
    of any pair of the set of grasps.

 The first node is defined by the empty set. The graph is built recursiveley
 as follows:

 if the set of grasps defining the node is not allowed (method \\link
     constraint_graph_factory.GraphFactoryAbstract.graspIsAllowed
     graspIsAllowed \\endlink), return.

 Otherwise, for any pair \\f$(g,h)\f$ of available grippers and available
 handles,
 \\li build a new state by adding grasp \\f$(g,h)\\f$ to the current set of
     grasps (method
     \\link constraint_graph_factory.GraphFactoryAbstract.makeState
     makeState\\endlink),
 \\li build a transition from the current state to the new state (method \\link
     constraint_graph_factory.GraphFactoryAbstract.makeTransition
     makeTransition \\endlink)
 \\li build a loopTransition from the current state to itself (method \\link
     constraint_graph_factory.GraphFactoryAbstract.makeLoopTransition
     makeLoopTransition \\endlink)
 \\li repeat the two above states to the new state.

Constructor & Destructor Documentation

◆ __init__()

def manipulation.constraint_graph_factory.GraphFactoryAbstract.__init__ (   self)

Member Function Documentation

◆ environmentContacts()

def manipulation.constraint_graph_factory.GraphFactoryAbstract.environmentContacts (   self,
  envContacts 
)
\\param envContacts contact on the environment to be considered.

◆ generate()

def manipulation.constraint_graph_factory.GraphFactoryAbstract.generate (   self)
Go through the combinatorial defined by the grippers and handles
and create the states and transitions.

◆ makeLoopTransition()

def manipulation.constraint_graph_factory.GraphFactoryAbstract.makeLoopTransition (   self,
  state 
)
Create a loop transition.
\\param state: an object returned by \\ref makeState which represent the state

Reimplemented in manipulation.constraint_graph_factory.ConstraintGraphFactory.

◆ makeState()

def manipulation.constraint_graph_factory.GraphFactoryAbstract.makeState (   self,
  grasps,
  priority 
)
Create a new state.
\\param grasps a handle index for each gripper,
        as in GraphFactoryAbstract.graspIsAllowed.
\\param priority the state priority.
\\return an object representing the state.

Reimplemented in manipulation.constraint_graph_factory.ConstraintGraphFactory.

◆ makeTransition()

def manipulation.constraint_graph_factory.GraphFactoryAbstract.makeTransition (   self,
  stateFrom,
  stateTo,
  ig 
)
Create two transitions between two different states.
\\param stateFrom: same as grasps in \\ref makeState
\\param stateTo: same as grasps in \\ref makeState
\\param ig: index if the grasp vector that changes, i.e. such that
  - \\f$ stateFrom.grasps[i_g] \neq stateTo.grasps[i_g] \\f$
  - \\f$ \\forall i \neq i_g, stateFrom.grasps[i] = stateTo.grasps[i] \\f$

Reimplemented in manipulation.constraint_graph_factory.ConstraintGraphFactory.

◆ setGrippers()

def manipulation.constraint_graph_factory.GraphFactoryAbstract.setGrippers (   self,
  grippers 
)
\\param grippers list of gripper names to be considered

◆ setObjects()

def manipulation.constraint_graph_factory.GraphFactoryAbstract.setObjects (   self,
  objects,
  handlesPerObjects,
  contactsPerObjects 
)
\\param objects list of object names to be considered
\\param handlesPerObjects a list of list of handle names.
\\param contactsPerObjects a list of list of contact names.
 handlesPerObjects and contactsPerObjects must have one list for each object,
 in the same order.

◆ setRules()

def manipulation.constraint_graph_factory.GraphFactoryAbstract.setRules (   self,
  rules 
)
Set the function \\ref graspIsAllowed
\\param rules a list of Rule objects

◆ transitionIsAllowed()

def manipulation.constraint_graph_factory.GraphFactoryAbstract.transitionIsAllowed (   self,
  stateFrom,
  stateTo 
)
Check whether a transition between two states is allowed
\\param stateFrom, stateTo states to connect

Member Data Documentation

◆ contactsPerObjects

manipulation.constraint_graph_factory.GraphFactoryAbstract.contactsPerObjects

◆ envContacts

manipulation.constraint_graph_factory.GraphFactoryAbstract.envContacts

◆ graspIsAllowed

manipulation.constraint_graph_factory.GraphFactoryAbstract.graspIsAllowed

◆ grippers

manipulation.constraint_graph_factory.GraphFactoryAbstract.grippers

◆ handles

manipulation.constraint_graph_factory.GraphFactoryAbstract.handles

◆ handlesPerObjects

manipulation.constraint_graph_factory.GraphFactoryAbstract.handlesPerObjects

◆ objectFromHandle

manipulation.constraint_graph_factory.GraphFactoryAbstract.objectFromHandle

◆ objects

manipulation.constraint_graph_factory.GraphFactoryAbstract.objects

◆ states

manipulation.constraint_graph_factory.GraphFactoryAbstract.states

◆ transitions

manipulation.constraint_graph_factory.GraphFactoryAbstract.transitions

The documentation for this class was generated from the following file: