hpp-corbaserver  4.9.0
Corba server for Humanoid Path Planner applications
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:
Collaboration diagram for hpp.corbaserver.robot.Robot:

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 urdfSrdfFilenames (self)
 Return urdf and srdf filenames. More...
 
def urdfSrdfString (self)
 
def loadModel (self, robotName, rootJointType)
 
def urdfPath (self)
 
def srdfPath (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 getParentFrame (self, frameName)
 Get parent frame of a frame. More...
 
def getChildFrames (self, frameName, recursive=False)
 Get child frames of a frame. More...
 
def getParentJoint (self, jointName)
 Get parent joint of a joint (excluding anchor joints) More...
 
def getChildJoints (self, jointName, recursive=False)
 Get child joints of a joint (excluding anchor joints) 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
 
 childFrames
 
 parentJoint
 
 childJoints
 

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

◆ __init__()

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

Member Function Documentation

◆ distancesToCollision()

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.

◆ getAllJointNames()

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

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

◆ getCenterOfMass()

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

Get position of center of mass.

◆ getChildFrames()

def hpp.corbaserver.robot.Robot.getChildFrames (   self,
  frameName,
  recursive = False 
)

Get child frames of a frame.

Parameters
frameNamename of the frame

◆ getChildJoints()

def hpp.corbaserver.robot.Robot.getChildJoints (   self,
  jointName,
  recursive = False 
)

Get child joints of a joint (excluding anchor joints)

◆ getConfigSize()

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

Get size of configuration.

Returns
size of configuration

◆ getCurrentConfig()

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

Get current configuration of composite robot.

Returns
configuration of the composite robot

◆ getCurrentTransformation()

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

Get joint transformation in world frame for current configuration.

◆ getCurrentVelocity()

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

Get current velocity of composite robot.

Returns
velocity of the composite robot

◆ getJacobianCenterOfMass()

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

Get Jacobian of the center of mass.

◆ getJointBounds()

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.

◆ getJointConfigSize()

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

Get joint number config size.

◆ getJointInnerObjects()

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.

◆ getJointNames()

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

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

◆ getJointNumberDof()

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

Get joint number degrees of freedom.

◆ getJointOuterObjects()

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

◆ getJointPosition()

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

Get joint position.

◆ getJointTypes()

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

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

◆ getLinkNames()

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

Get link name.

Parameters
jointNamename of the joint,
Returns
name of the link.

◆ getLinkPosition()

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.

◆ getMass()

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

Get mass of robot.

◆ getNumberDof()

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

◆ getObjectPosition()

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

◆ getParentFrame()

def hpp.corbaserver.robot.Robot.getParentFrame (   self,
  frameName 
)

Get parent frame of a frame.

Parameters
frameNamename of the frame

◆ getParentJoint()

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

Get parent joint of a joint (excluding anchor joints)

Parameters
jointNamename of the joint

◆ getRobotAABB()

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.

◆ getRootJointPosition()

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

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

◆ getSaturated()

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

◆ isConfigValid()

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.

◆ loadModel()

def hpp.corbaserver.robot.Robot.loadModel (   self,
  robotName,
  rootJointType 
)

◆ rebuildRanks()

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

Rebuild inner variables rankInConfiguration and rankInVelocity.

compute the kinematic tree.

◆ removeObstacleFromJoint()

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,

◆ setCurrentConfig()

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

Set current configuration of composite robot.

Parameters
qconfiguration of the composite robot

◆ setCurrentVelocity()

def hpp.corbaserver.robot.Robot.setCurrentVelocity (   self,
  v 
)

Set current velocity of composite robot.

Parameters
qvelocity of the composite robot

◆ setJointBounds()

def hpp.corbaserver.robot.Robot.setJointBounds (   self,
  jointName,
  inJointBound 
)

set bounds for the joint

◆ setJointPosition()

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

Set the static position of joint WRT its parent.

◆ setRootJointPosition()

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

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

◆ shootRandomConfig()

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

Shoot random configuration.

Returns
dofArray Array of degrees of freedom.

◆ srdfPath()

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

◆ urdfPath()

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

◆ urdfSrdfFilenames()

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

Return urdf and srdf filenames.

◆ urdfSrdfString()

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

Member Data Documentation

◆ allJointNames

hpp.corbaserver.robot.Robot.allJointNames

◆ childFrames

hpp.corbaserver.robot.Robot.childFrames

◆ childJoints

hpp.corbaserver.robot.Robot.childJoints

◆ client

hpp.corbaserver.robot.Robot.client

◆ displayName

hpp.corbaserver.robot.Robot.displayName

◆ hppcorba

hpp.corbaserver.robot.Robot.hppcorba

◆ jointNames

hpp.corbaserver.robot.Robot.jointNames

◆ name

hpp.corbaserver.robot.Robot.name

◆ parentJoint

hpp.corbaserver.robot.Robot.parentJoint

◆ rankInConfiguration

hpp.corbaserver.robot.Robot.rankInConfiguration

◆ rankInVelocity

hpp.corbaserver.robot.Robot.rankInVelocity

◆ rootJointType

hpp.corbaserver.robot.Robot.rootJointType

The documentation for this class was generated from the following file: