manipulation::constraint_graph::ConstraintGraph Class Reference

List of all members.

Public Member Functions

def __init__
def display
 Display the current graph.
def createNode
 Create one or several node.
def createEdge
 Create an edge.
def createWaypointEdge
 Create a WaypointEdge.
def createLevelSetEdge
 Create a LevelSetEdge.
def createGrasp
 Create grasp constraints between a gripper and a handle.
def createPreGrasp
 Create pre-grasp constraints between a gripper and a handle See createGrasp.
def setConstraints
 Set the constraints of an edge or a node.
def setLevelSetConstraints
 Set the numerical constraints of a LevelSetEdge that create the foliation.
def addTextToTeXTranslation
 Add entry to the local dictionnary.
def setTextToTeXTranslation
 Set the local dictionnary.

Public Attributes

 client
 clientBasic
 graph
 name
 grasps
 pregrasps
 nodes
 edges
 graphId
 subGraphId
 textToTex

Static Public Attributes

dictionary cmdDot
dictionary cmdViewer

Constructor & Destructor Documentation

def manipulation::constraint_graph::ConstraintGraph::__init__ (   self,
  robot,
  graphName 
)

Member Function Documentation

def manipulation::constraint_graph::ConstraintGraph::addTextToTeXTranslation (   self,
  text,
  tex 
)

Add entry to the local dictionnary.

Parameters:
textplain text
texits latex translation
See also:
ConstraintGraph.setTextToTeXTranslation

References textToTex.

def manipulation::constraint_graph::ConstraintGraph::createEdge (   self,
  nodeFrom,
  nodeTo,
  name,
  weight = 1,
  isInNodeFrom = None 
)

Create an edge.

Parameters:
nodeFrom,nodeTothe extremities of the edge,
namename of the edge,
weightsee note,
isInNodeFromtrue if a path corresponding to this edge lies in nodeFrom; this will be automatically set if you leave it.
Note:
The weights define the probability of selecting an edge among all the outgoing edges of a node. The probability of an edge is $ \frac{w_i}{\sum_j{w_j}} $, where each $ w_j $ corresponds to an outgoing edge from a given node. To have an edge that cannot be selected by the M-RRT algorithm but is still acceptable, set its weight to zero.

References _(), hpp::GraphElements::edges, edges, graph, hpp::GraphElements::nodes, and nodes.

def manipulation::constraint_graph::ConstraintGraph::createGrasp (   self,
  name,
  gripper,
  handle,
  passiveJoints = "" 
)

Create grasp constraints between a gripper and a handle.

Parameters:
namebasename of the constraints,
gripper,handlenames of the gripper and handle,
passiveJointsa list of joints that should not be modified by the constraint.
Note:
The passive joints are only used for path constraints and are for optimization only.

References _(), hpp::corbaserver::problem_solver::ProblemSolver::client, hpp::corbaserver::robot::Robot::client, manipulation::problem_solver::ProblemSolver::client, client, and grasps.

def manipulation::constraint_graph::ConstraintGraph::createLevelSetEdge (   self,
  nodeFrom,
  nodeTo,
  name,
  weight = 1,
  isInNodeFrom = None 
)

Create a LevelSetEdge.

Parameters:
nodeFrom,nodeTo,name,weight,isInNodeFromsee createEdge note.
Note:
See documentation of class hpp::manipulation::graph::LevelSetEdge for more information.

References _(), hpp::GraphElements::edges, edges, graph, hpp::GraphElements::nodes, and nodes.

def manipulation::constraint_graph::ConstraintGraph::createNode (   self,
  node 
)

Create one or several node.

Parameters:
nodename (resp. list of names) of the node(s) to be created.
Note:
The order is important. The first should be the most restrictive one as a configuration will be in the first node for which the constraint are satisfied.

References _(), graph, hpp::GraphElements::nodes, nodes, and subGraphId.

def manipulation::constraint_graph::ConstraintGraph::createPreGrasp (   self,
  name,
  gripper,
  handle,
  passiveJoints = "" 
)

Create pre-grasp constraints between a gripper and a handle See createGrasp.

References _(), hpp::corbaserver::problem_solver::ProblemSolver::client, hpp::corbaserver::robot::Robot::client, manipulation::problem_solver::ProblemSolver::client, client, and pregrasps.

def manipulation::constraint_graph::ConstraintGraph::createWaypointEdge (   self,
  nodeFrom,
  nodeTo,
  name,
  nb = 1,
  weight = 1,
  isInNodeFrom = None 
)

Create a WaypointEdge.

Parameters:
nodeFrom,nodeTo,name,weight,isInNodeFromsee createEdge note,
nbnumber of waypoints,
Returns:
an object containing two list:
           returnValue.edges
           returnValue.nodes
Each element of each list contains a name and an id. Nevertheless, the information is stored in the instance of this class.
Note:
See documentation of class hpp::manipulation::graph::WaypointEdge for more information.

References _(), hpp::GraphElements::edges, edges, graph, hpp::GraphElements::nodes, and nodes.

def manipulation::constraint_graph::ConstraintGraph::display (   self,
  dotOut = '/tmp/constraintgraph.dot',
  pdfOut = '/tmp/constraintgraph',
  format = 'pdf',
  open = True 
)

Display the current graph.

The graph is printed in DOT format. Command dot must be available.

Parameters:
dotOutfull path of the generated DOT file.
pdfOutfill path of the generated PDF document.
openPDFset to False if you just want to generate the PDF.
Note:
DOT and PDF files will be overwritten and are not automatically deleted so you can keep them.

References cmdDot, cmdViewer, and graph.

def manipulation::constraint_graph::ConstraintGraph::setConstraints (   self,
  graph = False,
  node = None,
  edge = None,
  grasp = None,
  pregrasp = None,
  lockDof = [],
  numConstraints = [],
  passiveJoints = [] 
)

Set the constraints of an edge or a node.

This method sets the constraints of an element of the graph and handles the special cases of grasps constraints.

Parameters:
graphset to true if you are defining constraints for every nodes,
node,edgename of a component of the graph,
grasp,pregraspname, or list of names, of grasp or pregrasp.
Note:
Exaclty one of the parameter graph, node and edge must be set.

References hpp::GraphElements::edges, edges, graph, graphId, grasps, hpp::GraphElements::nodes, nodes, and pregrasps.

def manipulation::constraint_graph::ConstraintGraph::setLevelSetConstraints (   self,
  edge,
  grasp = None,
  pregrasp = None,
  lockDof = [],
  numConstraints = [],
  passiveJoints = [] 
)

Set the numerical constraints of a LevelSetEdge that create the foliation.

Parameters:
edgename of a LevelSetEdge of the graph.
grasp,pregraspname, or list of names, of grasp or pregrasp.
numConstraintsis an array of names of numerical constraints in the ProblemSolver map.
lockDofis an array of names of LockedDof constraints in the ProblemSolver map.
passiveJointsarray of names of vector of passive dofs in the ProblemSolver map.
Note:
If passiveDofsNames is a shorter list than numConstraints, passiveDofsNames is extended with an empty string, which corresponds to an empty vector of passive dofs.

References hpp::GraphElements::edges, edges, graph, grasps, and pregrasps.

def manipulation::constraint_graph::ConstraintGraph::setTextToTeXTranslation (   self,
  textToTex 
)

Set the local dictionnary.

Parameters:
textToTexa dictionnary of (plain text, TeX replacment) If the name of a node or an edges is a key of the dictionnary, it is replaced by the corresponding value.

References textToTex.


Member Data Documentation

Referenced by manipulation::robot::Robot::collisionTest(), createGrasp(), createPreGrasp(), manipulation::robot::Robot::distancesToCollision(), manipulation::robot::Robot::getAllJointNames(), manipulation::robot::Robot::getCenterOfMass(), manipulation::robot::Robot::getConfigSize(), manipulation::robot::Robot::getCurrentConfig(), manipulation::robot::Robot::getJacobianCenterOfMass(), manipulation::robot::Robot::getJointConfigSize(), manipulation::robot::Robot::getJointInnerObjects(), manipulation::robot::Robot::getJointNames(), manipulation::robot::Robot::getJointNumberDof(), manipulation::robot::Robot::getJointOuterObjects(), manipulation::robot::Robot::getJointPosition(), manipulation::robot::Robot::getLinkName(), manipulation::robot::Robot::getLinkPosition(), manipulation::robot::Robot::getMass(), manipulation::robot::Robot::getNumberDof(), manipulation::robot::Robot::getObjectPosition(), manipulation::robot::Robot::insertObjectModel(), manipulation::robot::Robot::insertRobotModel(), manipulation::robot::Robot::isConfigValid(), manipulation::robot::Robot::loadEnvironmentModel(), manipulation::robot::Robot::loadHumanoidModel(), manipulation::robot::Robot::loadModel(), manipulation::robot::HumanoidRobot::loadModel(), manipulation::robot::Robot::rebuildRanks(), manipulation::robot::Robot::removeObstacleFromJoint(), manipulation::robot::Robot::setCurrentConfig(), manipulation::robot::Robot::setJointBounds(), manipulation::robot::Robot::setJointPosition(), manipulation::robot::Robot::setTranslationBounds(), and manipulation::robot::Robot::shootRandomConfig().

Initial value:
{
            'pdf': ['dot', '-Gsize=7.5,10', '-Tpdf'],
            'svg': ['dot', '-Gsize=7.5,10', '-Tsvg']
            }

Referenced by display().

Initial value:
{
            'pdf': ['evince'],
            'svg': ['firefox']
            }

Referenced by display().