hpp::corbaserver::robot::Robot Class Reference

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

Inheritance diagram for hpp::corbaserver::robot::Robot:

List of all members.

Public Member Functions

def __init__
def loadModel
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 getRootJointPosition
 Get constant position of root joint in world frame in initial position.
def setRootJointPosition
 Set position of root joint in world frame in initial configuration.
def setJointPosition
 Set the static position of joint WRT its parent.
def getJointNumberDof
 Get joint number degrees of freedom.
def getJointConfigSize
 Get joint number config size.
def setJointBounds
 set bounds for the joint
def getLinkPosition
 Get link position in world frame.
def getLinkName
 Get link name.
Configurations
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

 name
 displayName
 tf_root
 rootJointType
 client
 jointNames
 allJointNames
 rankInConfiguration
 rankInVelocity

Detailed Description

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

This class is also used to initialize a client to rviz in order to display configurations of a robot.


Constructor & Destructor Documentation

def hpp::corbaserver::robot::Robot::__init__ (   self,
  robotName,
  rootJointType,
  load = True 
)

Member Function Documentation

def hpp::corbaserver::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, and client.

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.

References hpp::corbaserver::problem_solver::ProblemSolver::client, and client.

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

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

References hpp::corbaserver::problem_solver::ProblemSolver::client, and client.

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

Get position of center of mass.

References hpp::corbaserver::problem_solver::ProblemSolver::client, and client.

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

Get size of configuration.

Returns:
size of configuration

References hpp::corbaserver::problem_solver::ProblemSolver::client, and client.

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

Get current configuration of composite robot.

Returns:
configuration of the composite robot

References hpp::corbaserver::problem_solver::ProblemSolver::client, and client.

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

Get Jacobian of the center of mass.

References hpp::corbaserver::problem_solver::ProblemSolver::client, and client.

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

Get joint number config size.

References hpp::corbaserver::problem_solver::ProblemSolver::client, and client.

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.

References hpp::corbaserver::problem_solver::ProblemSolver::client, and client.

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

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

References hpp::corbaserver::problem_solver::ProblemSolver::client, and client.

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

Get joint number degrees of freedom.

References hpp::corbaserver::problem_solver::ProblemSolver::client, and client.

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

References hpp::corbaserver::problem_solver::ProblemSolver::client, and client.

def hpp::corbaserver::robot::Robot::getJointPosition (   self,
  jointName 
)
def hpp::corbaserver::robot::Robot::getLinkName (   self,
  jointName 
)

Get link name.

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

References hpp::corbaserver::problem_solver::ProblemSolver::client, and client.

def hpp::corbaserver::robot::Robot::getLinkPosition (   self,
  jointName 
)

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.

References hpp::corbaserver::problem_solver::ProblemSolver::client, and client.

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

References hpp::corbaserver::problem_solver::ProblemSolver::client, and client.

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

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

References hpp::corbaserver::problem_solver::ProblemSolver::client, and client.

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

References hpp::corbaserver::problem_solver::ProblemSolver::client, and client.

def hpp::corbaserver::robot::Robot::loadModel (   self,
  robotName,
  rootJointType 
)
def hpp::corbaserver::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, and client.

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

Set current configuration of composite robot.

Parameters:
qconfiguration of the composite robot

References hpp::corbaserver::problem_solver::ProblemSolver::client, and client.

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

set bounds for the joint

References hpp::corbaserver::problem_solver::ProblemSolver::client, and client.

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

Set the static position of joint WRT its parent.

References hpp::corbaserver::problem_solver::ProblemSolver::client, and client.

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

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

References hpp::corbaserver::problem_solver::ProblemSolver::client, and client.

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

Shoot random configuration.

Returns:
dofArray Array of degrees of freedom.

References hpp::corbaserver::problem_solver::ProblemSolver::client, and client.


Member Data Documentation