hpp-manipulation-corba  4.9.0
Corba server for manipulation planning
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:
Collaboration diagram for manipulation.constraint_graph_factory.GraphFactoryAbstract:

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:

Sketch of the algorithm

Let

  • $G$ be the set of grippers,
  • $H$ be the set of handles.

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

Each state (excluding waypoint states) is defined by a set of grasps. Given a set of grasps, we define

  • available grippers as the grippers that are not the first element of any pair of the set of grasps,
  • available handles 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 graspIsAllowed ), return.

Otherwise, for any pair $(g,h)$ of available grippers and available handles,

  • build a new state by adding grasp $(g,h)$ to the current set of grasps (method makeState),
  • build a transition from the current state to the new state (method makeTransition )
  • build a loopTransition from the current state to itself (method makeLoopTransition )
  • 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 
)
Parameters
envContactscontact 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.

Parameters
statean object returned by makeState which represent the state

◆ makeState()

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.

◆ makeTransition()

def manipulation.constraint_graph_factory.GraphFactoryAbstract.makeTransition (   self,
  stateFrom,
  stateTo,
  ig 
)

Create two transitions between two different states.

Parameters
stateFromsame as grasps in makeState
stateTosame as grasps in makeState
igindex if the grasp vector that changes, i.e. such that
  • $ stateFrom.grasps[i_g] \neq stateTo.grasps[i_g] $
  • $ \forall i \neq i_g, stateFrom.grasps[i] = stateTo.grasps[i] $

◆ setGrippers()

def manipulation.constraint_graph_factory.GraphFactoryAbstract.setGrippers (   self,
  grippers 
)
Parameters
gripperslist of gripper names to be considered

◆ setObjects()

def manipulation.constraint_graph_factory.GraphFactoryAbstract.setObjects (   self,
  objects,
  handlesPerObjects,
  contactsPerObjects 
)
Parameters
objectslist of object names to be considered
handlesPerObjectsa list of list of handle names.
contactsPerObjectsa 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 graspIsAllowed.

Parameters
rulesa list of Rule objects

Member Data Documentation

◆ contactsPerObjects

manipulation.constraint_graph_factory.GraphFactoryAbstract.contactsPerObjects

See setObjects.

◆ envContacts

manipulation.constraint_graph_factory.GraphFactoryAbstract.envContacts

the names of contact on the environment

◆ graspIsAllowed

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:

lambda x : True

◆ grippers

manipulation.constraint_graph_factory.GraphFactoryAbstract.grippers

the gripper names

◆ handles

manipulation.constraint_graph_factory.GraphFactoryAbstract.handles

the handle names

◆ handlesPerObjects

manipulation.constraint_graph_factory.GraphFactoryAbstract.handlesPerObjects

See setObjects.

◆ objectFromHandle

manipulation.constraint_graph_factory.GraphFactoryAbstract.objectFromHandle

See setObjects.

◆ objects

manipulation.constraint_graph_factory.GraphFactoryAbstract.objects

the object names

◆ 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: