hpp.corbaserver.robot.Robot Class Reference

Helper class to load a robot model in hpp::core::ProblemSolver. More...

Inheritance diagram for hpp.corbaserver.robot.Robot:
[legend]
Collaboration diagram for hpp.corbaserver.robot.Robot:
[legend]

Public Member Functions

def __init__ (self, robotName=None, rootJointType=None, load=True, client=None, hppcorbaClient=None)
 
def rebuildRanks (self)
 Rebuild inner variables rankInConfiguration and rankInVelocity. More...
 
def loadModel (self, robotName, rootJointType)
 
def urdfPath (self)
 
Degrees of freedom
def getConfigSize (self)
 Get size of configuration. More...
 
def getNumberDof (self)
 
Joints
def getJointNames (self)
 Get joint names in the same order as in the configuration. More...
 
def getJointTypes (self)
 Get joint types in the same order as in the configuration. More...
 
def getAllJointNames (self)
 Get joint names in the same order as in the configuration. More...
 
def getJointPosition (self, jointName)
 Get joint position. More...
 
def getRootJointPosition (self)
 Get constant position of root joint in world frame in initial position. More...
 
def setRootJointPosition (self, position)
 Set position of root joint in world frame in initial configuration. More...
 
def setJointPosition (self, jointName, position)
 Set the static position of joint WRT its parent. More...
 
def getCurrentTransformation (self, jointName)
 Get joint transformation in world frame for current configuration. More...
 
def getJointNumberDof (self, jointName)
 Get joint number degrees of freedom. More...
 
def getJointConfigSize (self, jointName)
 Get joint number config size. More...
 
def setJointBounds (self, jointName, inJointBound)
 set bounds for the joint More...
 
def getJointBounds (self, jointName)
 Get bounds for a joint. More...
 
def getSaturated (self, q)
 Get joints that are saturated for a given configuration. More...
 
def getLinkPosition (self, linkName)
 Get link position in world frame. More...
 
def getLinkNames (self, jointName)
 Get link name. More...
 
Configurations
def setCurrentConfig (self, q)
 Set current configuration of composite robot. More...
 
def getCurrentConfig (self)
 Get current configuration of composite robot. More...
 
def setCurrentVelocity (self, v)
 Set current velocity of composite robot. More...
 
def getCurrentVelocity (self)
 Get current velocity of composite robot. More...
 
def shootRandomConfig (self)
 Shoot random configuration. More...
 
Bodies
def getJointInnerObjects (self, jointName)
 Get the list of objects attached to a joint. More...
 
def getJointOuterObjects (self, jointName)
 Get list of collision objects tested with the body attached to a joint. More...
 
def getObjectPosition (self, objectName)
 Get position of robot object. More...
 
def removeObstacleFromJoint (self, objectName, jointName)
 Remove an obstacle from outer objects of a joint body. More...
 
Collision checking and distance computation
def isConfigValid (self, cfg)
 Check the validity of a configuration. More...
 
def distancesToCollision (self)
 Compute distances between bodies and obstacles. More...
 
def getRobotAABB (self)
 Get the aligned axes bounding box around the robot. More...
 
Mass and inertia
def getMass (self)
 Get mass of robot. More...
 
def getCenterOfMass (self)
 Get position of center of mass. More...
 
def getJacobianCenterOfMass (self)
 Get Jacobian of the center of mass. More...
 

Public Attributes

 client
 
 hppcorba
 
 name
 
 rootJointType
 
 displayName
 
 jointNames
 
 allJointNames
 
 rankInConfiguration
 
 rankInVelocity
 

Detailed Description

Helper class to load a robot model in hpp::core::ProblemSolver.

This class is also a wrapper of idl methods defined by hpp::corbaserver::Robot. Most methods call idl methods.

Constructor & Destructor Documentation

def hpp.corbaserver.robot.Robot.__init__ (   self,
  robotName = None,
  rootJointType = None,
  load = True,
  client = None,
  hppcorbaClient = None 
)

Member Function Documentation

def hpp.corbaserver.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.
def hpp.corbaserver.robot.Robot.getAllJointNames (   self)

Get joint names in the same order as in the configuration.

def hpp.corbaserver.robot.Robot.getCenterOfMass (   self)

Get position of center of mass.

def hpp.corbaserver.robot.Robot.getConfigSize (   self)

Get size of configuration.

Returns
size of configuration
def hpp.corbaserver.robot.Robot.getCurrentConfig (   self)

Get current configuration of composite robot.

Returns
configuration of the composite robot
def hpp.corbaserver.robot.Robot.getCurrentTransformation (   self,
  jointName 
)

Get joint transformation in world frame for current configuration.

def hpp.corbaserver.robot.Robot.getCurrentVelocity (   self)

Get current velocity of composite robot.

Returns
velocity of the composite robot
def hpp.corbaserver.robot.Robot.getJacobianCenterOfMass (   self)

Get Jacobian of the center of mass.

def hpp.corbaserver.robot.Robot.getJointBounds (   self,
  jointName 
)

Get bounds for a joint.

Parameters
jointNamename of the joint
Returns
sequence of bounds in order [v0_min,v0_max,v1_min,v1_max,...] where vi_min, vi_max are the bounds of the i-th degree of freedom of the joint if the degree of freedom is bounded, 1, 0 otherwise.

Referenced by hpp.corbaserver.robot.Robot.getSaturated().

def hpp.corbaserver.robot.Robot.getJointConfigSize (   self,
  jointName 
)

Get joint number config size.

def hpp.corbaserver.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.
def hpp.corbaserver.robot.Robot.getJointNames (   self)

Get joint names in the same order as in the configuration.

def hpp.corbaserver.robot.Robot.getJointNumberDof (   self,
  jointName 
)

Get joint number degrees of freedom.

def hpp.corbaserver.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
def hpp.corbaserver.robot.Robot.getJointPosition (   self,
  jointName 
)

Get joint position.

def hpp.corbaserver.robot.Robot.getJointTypes (   self)

Get joint types in the same order as in the configuration.

def hpp.corbaserver.robot.Robot.getLinkNames (   self,
  jointName 
)

Get link name.

Parameters
jointNamename of the joint,
Returns
name of the link.
def hpp.corbaserver.robot.Robot.getLinkPosition (   self,
  linkName 
)

Get link position in world 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.
def hpp.corbaserver.robot.Robot.getMass (   self)

Get mass of robot.

def hpp.corbaserver.robot.Robot.getNumberDof (   self)
def hpp.corbaserver.robot.Robot.getObjectPosition (   self,
  objectName 
)

Get position of robot object.

Parameters
objectNamename of the object.
Returns
transformation as a hpp.Transform object
def hpp.corbaserver.robot.Robot.getRobotAABB (   self)

Get the aligned axes bounding box around the robot.

Returns
a vector a 6 floats. The 3 first are one corner of the box (lowest in all dimensions), the 3 last are the opposite corner.
def hpp.corbaserver.robot.Robot.getRootJointPosition (   self)

Get constant position of root joint in world frame in initial position.

def hpp.corbaserver.robot.Robot.getSaturated (   self,
  q 
)

Get joints that are saturated for a given configuration.

Parameters
qconfiguration
Returns
list of triples joint names, dof id, value

References hpp.corbaserver.robot.Robot.getJointBounds(), hpp::corbaServer::impl::Robot.getJointBounds(), hpp::corbaserver::Robot.getJointBounds(), hpp.corbaserver.robot.Robot.jointNames, and hpp.corbaserver.robot.Robot.rankInConfiguration.

def hpp.corbaserver.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
Exceptions
ifconfig is not valid, raise an exception.
def hpp.corbaserver.robot.Robot.loadModel (   self,
  robotName,
  rootJointType 
)
def hpp.corbaserver.robot.Robot.rebuildRanks (   self)

Rebuild inner variables rankInConfiguration and rankInVelocity.

Referenced by hpp.corbaserver.robot.Robot.loadModel(), hpp.corbaserver.robot.HumanoidRobot.loadModel(), and hpp.corbaserver.robot.RobotXML.loadModel().

def hpp.corbaserver.robot.Robot.removeObstacleFromJoint (   self,
  objectName,
  jointName 
)

Remove an obstacle from outer objects of a joint body.

Parameters
objectNamename of the object to remove,
jointNamename of the joint owning the body,
def hpp.corbaserver.robot.Robot.setCurrentConfig (   self,
  q 
)
def hpp.corbaserver.robot.Robot.setCurrentVelocity (   self,
  v 
)

Set current velocity of composite robot.

Parameters
qvelocity of the composite robot
def hpp.corbaserver.robot.Robot.setJointBounds (   self,
  jointName,
  inJointBound 
)

set bounds for the joint

def hpp.corbaserver.robot.Robot.setJointPosition (   self,
  jointName,
  position 
)

Set the static position of joint WRT its parent.

def hpp.corbaserver.robot.Robot.setRootJointPosition (   self,
  position 
)

Set position of root joint in world frame in initial configuration.

def hpp.corbaserver.robot.Robot.shootRandomConfig (   self)

Shoot random configuration.

Returns
dofArray Array of degrees of freedom.
def hpp.corbaserver.robot.Robot.urdfPath (   self)

Member Data Documentation

hpp.corbaserver.robot.Robot.allJointNames
hpp.corbaserver.robot.Robot.client
hpp.corbaserver.robot.Robot.displayName
hpp.corbaserver.robot.Robot.hppcorba
hpp.corbaserver.robot.Robot.jointNames
hpp.corbaserver.robot.Robot.name
hpp.corbaserver.robot.Robot.rankInConfiguration
hpp.corbaserver.robot.Robot.rankInVelocity
hpp.corbaserver.robot.Robot.rootJointType