manipulation::robot::Robot Class Reference

Load and handle a composite robot for manipulation planning. More...

Inheritance diagram for manipulation::robot::Robot:

List of all members.

Public Member Functions

def __init__
 Constructor.
def loadModel
 Virtual function to load the robot model.
def insertRobotModel
 Load robot model and insert it in the device.
def loadHumanoidModel
 Load humanoid robot model and insert it in the device.
def insertObjectModel
 Load object model and insert it in the device.
def loadEnvironmentModel
 Load environment model and store in local map.
def rebuildRanks
 Rebuild inner variables rankInConfiguration and rankInVelocity.
Degrees of freedom
def getConfigSize
 Get size of configuration.
def getNumberDof
Joints
def getJointNames
 Get joint names in the same order as in the configuration.
def getAllJointNames
 Get joint names in the same order as in the configuration.
def getJointPosition
 Get joint position.
def setJointPosition
 Set static position of joint in its parent frame.
def getJointNumberDof
 Get joint number degrees of freedom.
def getJointConfigSize
 Get joint number config size.
def setJointBounds
 set bounds for the joint
def setTranslationBounds
 Set bounds on the translation part of the freeflyer joint.
def getLinkPosition
 Get link position in joint frame.
def getLinkName
 Get link name.
Access to current configuration
def setCurrentConfig
 Set current configuration of composite robot.
def getCurrentConfig
 Get current configuration of composite robot.
def shootRandomConfig
 Shoot random configuration.
Bodies
def getJointInnerObjects
 Get the list of objects attached to a joint.
def getJointOuterObjects
 Get list of collision objects tested with the body attached to a joint.
def getObjectPosition
 Get position of robot object.
def removeObstacleFromJoint
 Remove an obstacle from outer objects of a joint body.
Collision checking and distance computation
def collisionTest
 Test collision with obstacles and auto-collision.
def isConfigValid
 Check the validity of a configuration.
def distancesToCollision
 Compute distances between bodies and obstacles.
Mass and inertia
def getMass
 Get mass of robot.
def getCenterOfMass
 Get position of center of mass.
def getJacobianCenterOfMass
 Get Jacobian of the center of mass.

Public Attributes

 tf_root
 rootJointType
 name
 displayName
 client
 load
 jointNames
 rankInConfiguration
 rankInVelocity

Detailed Description

Load and handle a composite robot for manipulation planning.

A composite robot is a kinematic chain composed of several sub-kinematic chains rooted at an anchor joint.


Constructor & Destructor Documentation

def manipulation::robot::Robot::__init__ (   self,
  compositeName,
  robotName,
  rootJointType,
  load = True 
)

Constructor.

Parameters:
robotNamename of the first robot that is loaded now,
rootJointTypetype of root joint among ("freeflyer", "planar", "anchor"),
loadwhether to actually load urdf files. Set to no if you only want to initialize a corba client to an already initialized problem.

Member Function Documentation

def manipulation::robot::Robot::collisionTest (   self)

Test collision with obstacles and auto-collision.

Check whether current configuration of robot is valid by calling CkwsDevice::collisionTest ().

Returns:
whether configuration is valid
Note:
Deprecated. Use isConfigValid instead.

References hpp::corbaserver::problem_solver::ProblemSolver::client, hpp::corbaserver::robot::Robot::client, manipulation::problem_solver::ProblemSolver::client, manipulation::constraint_graph::ConstraintGraph::client, and client.

def manipulation::robot::Robot::distancesToCollision (   self)

Compute distances between bodies and obstacles.

Returns:
list of distances,
names of the objects belonging to a body
names of the objects tested with inner objects,
closest points on the body,
closest points on the obstacles
Note:
outer objects for a body can also be inner objects of another body.

References hpp::corbaserver::problem_solver::ProblemSolver::client, hpp::corbaserver::robot::Robot::client, manipulation::problem_solver::ProblemSolver::client, manipulation::constraint_graph::ConstraintGraph::client, and client.

def manipulation::robot::Robot::getAllJointNames (   self)
def manipulation::robot::Robot::getConfigSize (   self)
def manipulation::robot::Robot::getCurrentConfig (   self)
def manipulation::robot::Robot::getJointInnerObjects (   self,
  jointName 
)

Get the list of objects attached to a joint.

Parameters:
inJointNamename of the joint.
Returns:
list of names of CollisionObject attached to the body.

References hpp::corbaserver::problem_solver::ProblemSolver::client, hpp::corbaserver::robot::Robot::client, manipulation::problem_solver::ProblemSolver::client, manipulation::constraint_graph::ConstraintGraph::client, and client.

def manipulation::robot::Robot::getJointNames (   self)
def manipulation::robot::Robot::getJointNumberDof (   self,
  jointName 
)
def manipulation::robot::Robot::getJointOuterObjects (   self,
  jointName 
)

Get list of collision objects tested with the body attached to a joint.

Parameters:
inJointNamename of the joint.
Returns:
list of names of CollisionObject

References hpp::corbaserver::problem_solver::ProblemSolver::client, hpp::corbaserver::robot::Robot::client, manipulation::problem_solver::ProblemSolver::client, manipulation::constraint_graph::ConstraintGraph::client, and client.

def manipulation::robot::Robot::getLinkName (   self,
  jointName 
)
def manipulation::robot::Robot::getLinkPosition (   self,
  jointName 
)

Get link position in joint frame.

Joints are oriented in a different way as in urdf standard since rotation and uni-dimensional translation joints act around or along their x-axis. This method returns the position of the urdf link in world frame.

Parameters:
jointNamename of the joint
Returns:
position of the link in world frame.

References hpp::corbaserver::problem_solver::ProblemSolver::client, hpp::corbaserver::robot::Robot::client, manipulation::problem_solver::ProblemSolver::client, manipulation::constraint_graph::ConstraintGraph::client, and client.

def manipulation::robot::Robot::getObjectPosition (   self,
  objectName 
)

Get position of robot object.

Parameters:
objectNamename of the object.
Returns:
transformation as a hpp.Transform object

References hpp::corbaserver::problem_solver::ProblemSolver::client, hpp::corbaserver::robot::Robot::client, manipulation::problem_solver::ProblemSolver::client, manipulation::constraint_graph::ConstraintGraph::client, and client.

def manipulation::robot::Robot::insertObjectModel (   self,
  objectName,
  rootJointType,
  packageName,
  modelName,
  urdfSuffix,
  srdfSuffix 
)

Load object model and insert it in the device.

Parameters:
robotNamekey of the object in ProblemSolver object map (see hpp::manipulation::ProblemSolver::addRobot)
rootJointTypetype of root joint among "anchor", "freeflyer", "planar",
packageNameName of the ROS package containing the model,
modelNameName of the package containing the model
urdfSuffixsuffix for urdf file,

The ros url are built as follows:

  • "package://${packageName}/urdf/${modelName}${urdfSuffix}.urdf"
  • "package://${packageName}/srdf/${modelName}${srdfSuffix}.srdf"

References hpp::corbaserver::problem_solver::ProblemSolver::client, hpp::corbaserver::robot::Robot::client, manipulation::problem_solver::ProblemSolver::client, manipulation::constraint_graph::ConstraintGraph::client, client, load, rebuildRanks(), hpp::corbaserver::robot::Robot::rootJointType, and rootJointType.

def manipulation::robot::Robot::insertRobotModel (   self,
  robotName,
  rootJointType,
  packageName,
  modelName,
  urdfSuffix,
  srdfSuffix 
)

Load robot model and insert it in the device.

Parameters:
robotNamekey of the robot in hpp::manipulation::ProblemSolver object map (see hpp::manipulation::ProblemSolver::addRobot)
rootJointTypetype of root joint among "anchor", "freeflyer", "planar",
packageNameName of the ROS package containing the model,
modelNameName of the package containing the model
urdfSuffixsuffix for urdf file,

The ros url are built as follows:

  • "package://${packageName}/urdf/${modelName}${urdfSuffix}.urdf"
  • "package://${packageName}/srdf/${modelName}${srdfSuffix}.srdf"

References hpp::corbaserver::problem_solver::ProblemSolver::client, hpp::corbaserver::robot::Robot::client, manipulation::problem_solver::ProblemSolver::client, manipulation::constraint_graph::ConstraintGraph::client, client, load, rebuildRanks(), hpp::corbaserver::robot::Robot::rootJointType, and rootJointType.

Referenced by loadModel().

def manipulation::robot::Robot::isConfigValid (   self,
  cfg 
)

Check the validity of a configuration.

Check whether a configuration of robot is valid.

Parameters:
cfga configuration
Returns:
whether configuration is valid

References hpp::corbaserver::problem_solver::ProblemSolver::client, hpp::corbaserver::robot::Robot::client, manipulation::problem_solver::ProblemSolver::client, manipulation::constraint_graph::ConstraintGraph::client, and client.

def manipulation::robot::Robot::loadEnvironmentModel (   self,
  packageName,
  modelName,
  urdfSuffix,
  srdfSuffix,
  envName 
)

Load environment model and store in local map.

Contact surfaces are build from the corresping srdf file. See hpp-manipulation-urdf for more details about contact surface specifications.

Parameters:
envNamekey of the object in ProblemSolver object map (see hpp::manipulation::ProblemSolver::addRobot)
packageNameName of the ROS package containing the model,
modelNameName of the package containing the model
urdfSuffixsuffix for urdf file,
srdfSuffixsuffix for srdf file.

The ros url are built as follows:

  • "package://${packageName}/urdf/${modelName}${urdfSuffix}.urdf"
  • "package://${packageName}/srdf/${modelName}${srdfSuffix}.srdf"

References hpp::corbaserver::problem_solver::ProblemSolver::client, hpp::corbaserver::robot::Robot::client, manipulation::problem_solver::ProblemSolver::client, manipulation::constraint_graph::ConstraintGraph::client, client, load, hpp::corbaserver::robot::Robot::rootJointType, and rootJointType.

def manipulation::robot::Robot::loadHumanoidModel (   self,
  robotName,
  rootJointType,
  packageName,
  modelName,
  urdfSuffix,
  srdfSuffix 
)

Load humanoid robot model and insert it in the device.

Parameters:
robotNamekey of the robot in ProblemSolver object map (see hpp::manipulation::ProblemSolver::addRobot)
rootJointTypetype of root joint among "anchor", "freeflyer", "planar",
packageNameName of the ROS package containing the model,
modelNameName of the package containing the model
urdfSuffixsuffix for urdf file,

The ros url are built as follows:

  • "package://${packageName}/urdf/${modelName}${urdfSuffix}.urdf"
  • "package://${packageName}/srdf/${modelName}${srdfSuffix}.srdf"

References hpp::corbaserver::problem_solver::ProblemSolver::client, hpp::corbaserver::robot::Robot::client, manipulation::problem_solver::ProblemSolver::client, manipulation::constraint_graph::ConstraintGraph::client, client, load, rebuildRanks(), hpp::corbaserver::robot::Robot::rootJointType, and rootJointType.

def manipulation::robot::Robot::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.

References hpp::corbaserver::problem_solver::ProblemSolver::client, hpp::corbaserver::robot::Robot::client, manipulation::problem_solver::ProblemSolver::client, manipulation::constraint_graph::ConstraintGraph::client, and client.

def manipulation::robot::Robot::setCurrentConfig (   self,
  q 
)
def manipulation::robot::Robot::setJointBounds (   self,
  jointName,
  inJointBound 
)
def manipulation::robot::Robot::setJointPosition (   self,
  jointName,
  position 
)
def manipulation::robot::Robot::setTranslationBounds (   self,
  xmin,
  xmax,
  ymin,
  ymax,
  zmin,
  zmax 
)
def manipulation::robot::Robot::shootRandomConfig (   self)

Member Data Documentation