hpp::corbaserver::problem_solver::ProblemSolver Class Reference

Definition of a path planning problem. More...

List of all members.

Public Member Functions

def __init__
Initial and goal configurations
def setInitialConfig
 Set initial configuration of specified problem.
def getInitialConfig
 Get initial configuration of specified problem.
def addGoalConfig
 Add goal configuration to specified problem.
def getGoalConfigs
 Get goal configurations of specified problem.
def resetGoalConfigs
 Reset goal configurations.
Obstacles
def loadObstacleFromUrdf
 Load obstacle from urdf file.
def removeObstacleFromJoint
 Remove an obstacle from outer objects of a joint body.
def moveObstacle
 Move an obstacle to a given configuration.
def getObstaclePosition
 Get the position of an obstacle.
def getObstacleNames
 Get list of obstacles.
Constraints
def createOrientationConstraint
 Create orientation constraint between two joints.
def createRelativeComConstraint
 Create RelativeCom constraint between two joints.
def createComBeetweenFeet
 Create ComBeetweenFeet constraint between two joints.
def addPartialCom
 Add an object to compute a partial COM of the robot.
def createPositionConstraint
 Create position constraint between two joints.
def resetConstraints
 Reset Constraints.
def setNumericalConstraints
 Set numerical constraints in ConfigProjector.
def applyConstraints
 Apply constraints.
def addPassiveDofs
 Create a vector of passive dofs.
def generateValidConfig
 Generate a configuration satisfying the constraints.
def lockJoint
 Lock joint with given joint configuration.
def setErrorThreshold
 error threshold in numerical constraint resolution
def setMaxIterations
 Set the maximal number of iterations.
Solve problem and get paths
def selectPathPlanner
 Select path planner type.
def selectPathOptimizer
 Select path optimizer type.
def selectPathValidation
 Select path validation method.
def selectPathProjector
 Select path projector method.
def solve
 Solve the problem of corresponding ChppPlanner object.
def directPath
 Make direct connection between two configurations.
def numberPaths
 Get Number of paths.
def optimizePath
 Optimize a given path.
def pathLength
 Get length of path.
def configAtParam
 Get the robot's config at param on the a path.
def getWaypoints
 Get way points of a path.
Interruption of a path planning request
def interruptPathPlanning
 Interrupt path planning activity.
exploring the roadmap
def nodes
 Get nodes of the roadmap.
def numberEdges
 Number of edges.
def edge
 Edge at given rank.
def numberConnectedComponents
 Number of connected components.
def nodesConnectedComponent
 Nodes of a connected component.
def clearRoadmap
 Clear the roadmap.

Public Attributes

 client
 robot

Detailed Description

Definition of a path planning problem.

This class wraps the Corba client to the server implemented by libhpp-corbaserver.so

Some method implemented by the server can be considered as private. The goal of this class is to hide them and to expose those that can be considered as public.


Constructor & Destructor Documentation

def hpp::corbaserver::problem_solver::ProblemSolver::__init__ (   self,
  robot 
)

Member Function Documentation

def hpp::corbaserver::problem_solver::ProblemSolver::addGoalConfig (   self,
  dofArray 
)

Add goal configuration to specified problem.

Parameters:
dofArrayArray of degrees of freedom
Exceptions:
Error.

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::addPartialCom (   self,
  comName,
  jointNames 
)

Add an object to compute a partial COM of the robot.

Parameters:
nameof the partial com
jointNameslist of joint name of each tree ROOT to consider.
Note:
Joints are added recursively, it is not possible so far to add a joint without addind all its children.

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::addPassiveDofs (   self,
  name,
  dofNames 
)

Create a vector of passive dofs.

Parameters:
namename of the vector in the ProblemSolver map.
dofNameslist of names of DOF that may

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::applyConstraints (   self,
  q 
)

Apply constraints.

Parameters:
qinitial configuration
Returns:
configuration projected in success,
Exceptions:
Errorif projection failed.

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::clearRoadmap (   self)

Clear the roadmap.

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::configAtParam (   self,
  inPathId,
  atDistance 
)

Get the robot's config at param on the a path.

Parameters:
inPathIdrank of the path in the problem
atDistance: the user parameter choice
Returns:
dofseq : the config at param

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::createComBeetweenFeet (   self,
  constraintName,
  comName,
  jointLName,
  jointRName,
  pointL,
  pointR,
  jointRefName,
  mask 
)

Create ComBeetweenFeet constraint between two joints.

Parameters:
constraintNamename of the constraint created,
comNamename of CenterOfMassComputation
jointLNamename of first joint
jointRNamename of second joint
pointLpoint in local frame of jointL.
pointRpoint in local frame of jointR.
jointRefNamename of second joint
maskSelect axis to be constrained. If jointRef is "", the robot root joint is used. Constraints are stored in ProblemSolver object

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::createOrientationConstraint (   self,
  constraintName,
  joint1Name,
  joint2Name,
  p,
  mask 
)

Create orientation constraint between two joints.

Parameters:
constraintNamename of the constraint created,
joint1Namename of first joint
joint2Namename of second joint
pquaternion representing the desired orientation of joint2 in the frame of joint1.
maskSelect which axis to be constrained. If joint1 or joint2 is "", the corresponding joint is replaced by the global frame. constraints are stored in ProblemSolver object

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::createPositionConstraint (   self,
  constraintName,
  joint1Name,
  joint2Name,
  point1,
  point2,
  mask 
)

Create position constraint between two joints.

Parameters:
constraintNamename of the constraint created,
joint1Namename of first joint
joint2Namename of second joint
point1point in local frame of joint1,
point2point in local frame of joint2.
maskSelect which axis to be constrained. If joint1 of joint2 is "", the corresponding joint is replaced by the global frame. constraints are stored in ProblemSolver object

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::createRelativeComConstraint (   self,
  constraintName,
  comName,
  jointLName,
  point,
  mask 
)

Create RelativeCom constraint between two joints.

Parameters:
constraintNamename of the constraint created,
comNamename of CenterOfMassComputation
jointNamename of joint
pointpoint in local frame of joint.
maskSelect axis to be constrained. If jointName is "", the robot root joint is used. Constraints are stored in ProblemSolver object

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::directPath (   self,
  startConfig,
  endConfig 
)

Make direct connection between two configurations.

Parameters:
startConfig,endConfig,:the configurations to link.
Exceptions:
Errorif steering method fails to create a direct path of if direct path is not valid

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::edge (   self,
  edgeId 
)

Edge at given rank.

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::generateValidConfig (   self,
  maxIter 
)

Generate a configuration satisfying the constraints.

Parameters:
maxItermaximum number of tries,
Returns:
configuration projected in success,
Exceptions:
Errorif projection failed.

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::getGoalConfigs (   self)

Get goal configurations of specified problem.

Returns:
Array of degrees of freedom

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::getInitialConfig (   self)

Get initial configuration of specified problem.

Returns:
Array of degrees of freedom

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::getObstacleNames (   self,
  collision,
  distance 
)

Get list of obstacles.

Parameters:
collisionwhether to return obstacle for collision,
distancewhether to return obstacles for distance computation
Returns:
list of obstacles

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::getObstaclePosition (   self,
  objectName 
)

Get the position of an obstacle.

Parameters:
objectNamename of the polyhedron.
Return values:
cfgPosition of the obstacle.
Exceptions:
Error.

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::getWaypoints (   self,
  pathId 
)

Get way points of a path.

Parameters:
pathIdrank of the path in the problem

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::interruptPathPlanning (   self)

Interrupt path planning activity.

Note:
this method is effective only when multi-thread policy is used by CORBA server. See constructor of class Server for details.

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::loadObstacleFromUrdf (   self,
  package,
  filename,
  prefix 
)

Load obstacle from urdf file.

Parameters:
packageName of the package containing the model,
filenamename of the urdf file in the package (without suffix .urdf)
prefixprefix added to object names in case the same file is loaded several times

The ros url is built as follows: "package://${package}/urdf/${filename}.urdf"

The kinematic structure of the urdf file is ignored. Only the geometric objects are loaded as obstacles.

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::lockJoint (   self,
  jointName,
  value 
)

Lock joint with given joint configuration.

Parameters:
jointNamename of the joint
valuevalue of the joint configuration

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::moveObstacle (   self,
  objectName,
  cfg 
)

Move an obstacle to a given configuration.

Parameters:
objectNamename of the polyhedron.
cfgthe configuration of the obstacle.
Exceptions:
Error.
Note:
The obstacle is not added to local map impl::Obstacle::collisionListMap.
Build the collision entity of polyhedron for KCD.

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::nodes (   self)

Get nodes of the roadmap.

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::nodesConnectedComponent (   self,
  ccId 
)

Nodes of a connected component.

Parameters:
connectedComponentIdindex of connected component in roadmap
Returns:
list of nodes of the connected component.

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::numberConnectedComponents (   self)

Number of connected components.

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::numberEdges (   self)

Number of edges.

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::numberPaths (   self)

Get Number of paths.

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::optimizePath (   self,
  inPathId 
)

Optimize a given path.

Parameters:
inPathIdId of the path in this problem.
Exceptions:
Error.

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::pathLength (   self,
  inPathId 
)

Get length of path.

Parameters:
inPathIdrank of the path in the problem
Returns:
length of path if path exists.
def hpp::corbaserver::problem_solver::ProblemSolver::removeObstacleFromJoint (   self,
  objectName,
  jointName,
  collision,
  distance 
)

Remove an obstacle from outer objects of a joint body.

Parameters:
objectNamename of the object to remove,
jointNamename of the joint owning the body,
collisionwhether collision with object should be computed,
distancewhether distance to object should be computed.
Exceptions:
Error.

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::resetConstraints (   self)

Reset Constraints.

Reset all constraints, including numerical constraints and locked joints

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::resetGoalConfigs (   self)

Reset goal configurations.

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::selectPathOptimizer (   self,
  pathOptimizerType 
)

Select path optimizer type.

Parameters:
Nameof the path optimizer type, either "RandomShortcut" or any type added by core::ProblemSolver::addPathOptimizerType

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::selectPathPlanner (   self,
  pathPlannerType 
)

Select path planner type.

Parameters:
Nameof the path planner type, either "DiffusingPlanner", "VisibilityPrmPlanner", or any type added by method core::ProblemSolver::addPathPlannerType

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::selectPathProjector (   self,
  pathProjectorType,
  tolerance 
)

Select path projector method.

Parameters:
Nameof the path projector method, either "Discretized" "Progressive", "Dichotomy", or any type added by core::ProblemSolver::addPathProjectorType,
tolerancemaximal acceptable penetration.

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::selectPathValidation (   self,
  pathValidationType,
  tolerance 
)

Select path validation method.

Parameters:
Nameof the path validation method, either "Discretized" "Progressive", "Dichotomy", or any type added by core::ProblemSolver::addPathValidationType,
tolerancemaximal acceptable penetration.

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::setErrorThreshold (   self,
  threshold 
)

error threshold in numerical constraint resolution

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::setInitialConfig (   self,
  dofArray 
)

Set initial configuration of specified problem.

Parameters:
dofArrayArray of degrees of freedom
Exceptions:
Error.

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::setMaxIterations (   self,
  iterations 
)

Set the maximal number of iterations.

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::setNumericalConstraints (   self,
  name,
  names 
)

Set numerical constraints in ConfigProjector.

Parameters:
namename of the resulting numerical constraint obtained by stacking elementary numerical constraints,
nameslist of names of the numerical constraints as inserted by method hpp::core::ProblemSolver::addNumericalConstraint.

References client.

def hpp::corbaserver::problem_solver::ProblemSolver::solve (   self)

Solve the problem of corresponding ChppPlanner object.

References client.


Member Data Documentation

Referenced by addGoalConfig(), addPartialCom(), addPassiveDofs(), applyConstraints(), clearRoadmap(), hpp::corbaserver::robot::Robot::collisionTest(), configAtParam(), createComBeetweenFeet(), createOrientationConstraint(), createPositionConstraint(), createRelativeComConstraint(), directPath(), hpp::corbaserver::robot::Robot::distancesToCollision(), edge(), generateValidConfig(), hpp::corbaserver::robot::Robot::getAllJointNames(), hpp::corbaserver::robot::Robot::getCenterOfMass(), hpp::corbaserver::robot::Robot::getConfigSize(), hpp::corbaserver::robot::Robot::getCurrentConfig(), getGoalConfigs(), getInitialConfig(), hpp::corbaserver::robot::Robot::getJacobianCenterOfMass(), hpp::corbaserver::robot::Robot::getJointConfigSize(), hpp::corbaserver::robot::Robot::getJointInnerObjects(), hpp::corbaserver::robot::Robot::getJointNames(), hpp::corbaserver::robot::Robot::getJointNumberDof(), hpp::corbaserver::robot::Robot::getJointOuterObjects(), hpp::corbaserver::robot::Robot::getJointPosition(), hpp::corbaserver::robot::Robot::getLinkName(), hpp::corbaserver::robot::Robot::getLinkPosition(), hpp::corbaserver::robot::Robot::getMass(), hpp::corbaserver::robot::Robot::getNumberDof(), hpp::corbaserver::robot::Robot::getObjectPosition(), getObstacleNames(), getObstaclePosition(), hpp::corbaserver::robot::Robot::getRootJointPosition(), getWaypoints(), interruptPathPlanning(), hpp::corbaserver::robot::Robot::isConfigValid(), hpp::corbaserver::robot::Robot::loadModel(), hpp::corbaserver::robot::HumanoidRobot::loadModel(), loadObstacleFromUrdf(), lockJoint(), moveObstacle(), nodes(), nodesConnectedComponent(), numberConnectedComponents(), numberEdges(), numberPaths(), optimizePath(), removeObstacleFromJoint(), hpp::corbaserver::robot::Robot::removeObstacleFromJoint(), resetConstraints(), resetGoalConfigs(), selectPathOptimizer(), selectPathPlanner(), selectPathProjector(), selectPathValidation(), hpp::corbaserver::robot::Robot::setCurrentConfig(), setErrorThreshold(), setInitialConfig(), hpp::corbaserver::robot::Robot::setJointBounds(), hpp::corbaserver::robot::Robot::setJointPosition(), setMaxIterations(), setNumericalConstraints(), hpp::corbaserver::robot::Robot::setRootJointPosition(), hpp::corbaserver::robot::Robot::shootRandomConfig(), and solve().