|
hpp-manipulation-corba 6.0.0
Corba server for manipulation planning
|


Public Member Functions | |
| __init__ (self) | |
| setGrippers (self, grippers) | |
| setObjects (self, objects, handlesPerObjects, contactsPerObjects) | |
| environmentContacts (self, envContacts) | |
| setRules (self, rules) | |
| setPossibleGrasps (self, grasps) | |
| generate (self) | |
| makeState (self, grasps, priority) | |
| makeLoopTransition (self, state) | |
| transitionIsAllowed (self, stateFrom, stateTo) | |
| makeTransition (self, stateFrom, stateTo, ig) | |
Public Attributes | |
| graspIsAllowed | |
| states | |
| transitions | |
| handles | |
| grippers | |
| envContacts | |
| objects | |
| handlesPerObjects | |
| objectFromHandle | |
| contactsPerObjects | |
Protected Member Functions | |
| _existState (self, grasps) | |
| _makeState (self, grasps, priority) | |
| _isObjectGrasped (self, grasps, object) | |
| _stateName (self, grasps, abbrev=False) | |
| _transitionNames (self, sFrom, sTo, ig) | |
| _loopTransitionName (self, grasps) | |
| _recurse (self, grippers, handles, grasps, depth) | |
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.
| manipulation.constraint_graph_factory.GraphFactoryAbstract.__init__ | ( | self | ) |
Reimplemented in manipulation.constraint_graph_factory.ConstraintGraphFactory.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Recurse across all possible sets of grasps
This method visits all possible set of grasps and create states
and transitions between those states.
\\param grippers list of names of available grippers: that do not hold
an handle yet,
\\param handles list of names of available handles that are not hold yet
by a gripper.
\\param grasps list of grasps already active. Grasps are represented by
a list of handle indices or None if the gripper is available.
the order in the list corresponds to the order of the gripper
in the list of all grippers.
For instance, if a robot has 3 grippers registered in the factory
("g1", "g2", "g3"), handles ["h1", "h2"] are registered in
the factory, and grasps is equal to (1, 0, None), then
\\li "g1" holds "h2",
\\li "g2" holds "h1", and
\\li "g3" does not hold anything.
|
protected |
|
protected |
| manipulation.constraint_graph_factory.GraphFactoryAbstract.environmentContacts | ( | self, | |
| envContacts | |||
| ) |
\\param envContacts contact on the environment to be considered.
| manipulation.constraint_graph_factory.GraphFactoryAbstract.generate | ( | self | ) |
Go through the combinatorial defined by the grippers and handles and create the states and transitions.
| 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.
| 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.
| 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.
| manipulation.constraint_graph_factory.GraphFactoryAbstract.setGrippers | ( | self, | |
| grippers | |||
| ) |
\\param grippers list of gripper names to be considered
| 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.
| manipulation.constraint_graph_factory.GraphFactoryAbstract.setPossibleGrasps | ( | self, | |
| grasps | |||
| ) |
Define the possible grasps
\\param grasps a dictionaty whose keys are the grippers registered in
the factory and whose values are lists of handles also
registered in the factory
| manipulation.constraint_graph_factory.GraphFactoryAbstract.setRules | ( | self, | |
| rules | |||
| ) |
Set the function \\ref graspIsAllowed \\param rules a list of Rule objects
| manipulation.constraint_graph_factory.GraphFactoryAbstract.transitionIsAllowed | ( | self, | |
| stateFrom, | |||
| stateTo | |||
| ) |
Check whether a transition between two states is allowed \\param stateFrom, stateTo states to connect
| manipulation.constraint_graph_factory.GraphFactoryAbstract.contactsPerObjects |
| manipulation.constraint_graph_factory.GraphFactoryAbstract.envContacts |
| manipulation.constraint_graph_factory.GraphFactoryAbstract.graspIsAllowed |
| manipulation.constraint_graph_factory.GraphFactoryAbstract.grippers |
| manipulation.constraint_graph_factory.GraphFactoryAbstract.handles |
| manipulation.constraint_graph_factory.GraphFactoryAbstract.handlesPerObjects |
| manipulation.constraint_graph_factory.GraphFactoryAbstract.objectFromHandle |
| manipulation.constraint_graph_factory.GraphFactoryAbstract.objects |
| manipulation.constraint_graph_factory.GraphFactoryAbstract.states |
| manipulation.constraint_graph_factory.GraphFactoryAbstract.transitions |