Load and handle a composite robot for manipulation planning. More...
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 |
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.
def manipulation::robot::Robot::__init__ | ( | self, | |
compositeName, | |||
robotName, | |||
rootJointType, | |||
load = True |
|||
) |
Constructor.
robotName | name of the first robot that is loaded now, |
rootJointType | type of root joint among ("freeflyer", "planar", "anchor"), |
load | whether to actually load urdf files. Set to no if you only want to initialize a corba client to an already initialized problem. |
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 ().
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.
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 | ) |
Get joint names in the same order as in the configuration.
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::getCenterOfMass | ( | self | ) |
Get position of center of mass.
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::getConfigSize | ( | self | ) |
Get size of configuration.
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::getCurrentConfig | ( | self | ) |
Get current configuration of composite robot.
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::getJacobianCenterOfMass | ( | self | ) |
Get Jacobian of the center of mass.
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::getJointConfigSize | ( | self, | |
jointName | |||
) |
Get joint number config size.
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::getJointInnerObjects | ( | self, | |
jointName | |||
) |
Get the list of objects attached to a joint.
inJointName | name of the joint. |
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 | ) |
Get joint names in the same order as in the configuration.
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::getJointNumberDof | ( | self, | |
jointName | |||
) |
Get joint number degrees of freedom.
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::getJointOuterObjects | ( | self, | |
jointName | |||
) |
Get list of collision objects tested with the body attached to a joint.
inJointName | name of the joint. |
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::getJointPosition | ( | self, | |
jointName | |||
) |
def manipulation::robot::Robot::getLinkName | ( | self, | |
jointName | |||
) |
Get link name.
jointName | name of the joint, |
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::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.
jointName | name of the joint |
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::getMass | ( | self | ) |
def manipulation::robot::Robot::getNumberDof | ( | self | ) |
def manipulation::robot::Robot::getObjectPosition | ( | self, | |
objectName | |||
) |
Get position of robot object.
objectName | name of the 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.
robotName | key of the object in ProblemSolver object map (see hpp::manipulation::ProblemSolver::addRobot) |
rootJointType | type of root joint among "anchor", "freeflyer", "planar", |
packageName | Name of the ROS package containing the model, |
modelName | Name of the package containing the model |
urdfSuffix | suffix for urdf file, |
The ros url are built as follows:
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.
robotName | key of the robot in hpp::manipulation::ProblemSolver object map (see hpp::manipulation::ProblemSolver::addRobot) |
rootJointType | type of root joint among "anchor", "freeflyer", "planar", |
packageName | Name of the ROS package containing the model, |
modelName | Name of the package containing the model |
urdfSuffix | suffix for urdf file, |
The ros url are built as follows:
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.
cfg | a configuration |
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.
envName | key of the object in ProblemSolver object map (see hpp::manipulation::ProblemSolver::addRobot) |
packageName | Name of the ROS package containing the model, |
modelName | Name of the package containing the model |
urdfSuffix | suffix for urdf file, |
srdfSuffix | suffix for srdf file. |
The ros url are built as follows:
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.
robotName | key of the robot in ProblemSolver object map (see hpp::manipulation::ProblemSolver::addRobot) |
rootJointType | type of root joint among "anchor", "freeflyer", "planar", |
packageName | Name of the ROS package containing the model, |
modelName | Name of the package containing the model |
urdfSuffix | suffix for urdf file, |
The ros url are built as follows:
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::loadModel | ( | self, | |
robotName, | |||
rootJointType | |||
) |
Virtual function to load the robot model.
Reimplemented in manipulation::robot::HumanoidRobot.
References hpp::corbaserver::problem_solver::ProblemSolver::client, hpp::corbaserver::robot::Robot::client, manipulation::problem_solver::ProblemSolver::client, manipulation::constraint_graph::ConstraintGraph::client, client, hpp::corbaserver::manipulation::Robot::insertRobotModel(), insertRobotModel(), hpp::corbaserver::robot::Robot::name, hpp::GraphComp::name, manipulation::constraint_graph::ConstraintGraph::name, and name.
def manipulation::robot::Robot::rebuildRanks | ( | self | ) |
Rebuild inner variables rankInConfiguration and rankInVelocity.
References hpp::corbaserver::problem_solver::ProblemSolver::client, hpp::corbaserver::robot::Robot::client, manipulation::problem_solver::ProblemSolver::client, manipulation::constraint_graph::ConstraintGraph::client, client, hpp::corbaserver::robot::Robot::displayName, displayName, hpp::corbaserver::robot::Robot::jointNames, jointNames, hpp::corbaserver::robot::Robot::rankInConfiguration, rankInConfiguration, hpp::corbaserver::robot::Robot::rankInVelocity, and rankInVelocity.
Referenced by insertObjectModel(), insertRobotModel(), and loadHumanoidModel().
def manipulation::robot::Robot::removeObstacleFromJoint | ( | self, | |
objectName, | |||
jointName, | |||
collision, | |||
distance | |||
) |
Remove an obstacle from outer objects of a joint body.
objectName | name of the object to remove, |
jointName | name of the joint owning the body, |
collision | whether collision with object should be computed, |
distance | whether 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 | |||
) |
Set current configuration of composite robot.
q | configuration of the composite robot |
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::setJointBounds | ( | self, | |
jointName, | |||
inJointBound | |||
) |
def manipulation::robot::Robot::setJointPosition | ( | self, | |
jointName, | |||
position | |||
) |
Set static position of joint in its parent 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::setTranslationBounds | ( | self, | |
xmin, | |||
xmax, | |||
ymin, | |||
ymax, | |||
zmin, | |||
zmax | |||
) |
Set bounds on the translation part of the freeflyer joint.
Valid only if the robot has a freeflyer joint.
References hpp::corbaserver::problem_solver::ProblemSolver::client, hpp::corbaserver::robot::Robot::client, manipulation::problem_solver::ProblemSolver::client, manipulation::constraint_graph::ConstraintGraph::client, client, hpp::corbaserver::robot::Robot::displayName, and displayName.
def manipulation::robot::Robot::shootRandomConfig | ( | self | ) |
Shoot random configuration.
References hpp::corbaserver::problem_solver::ProblemSolver::client, hpp::corbaserver::robot::Robot::client, manipulation::problem_solver::ProblemSolver::client, manipulation::constraint_graph::ConstraintGraph::client, and client.
Referenced by collisionTest(), distancesToCollision(), getAllJointNames(), getCenterOfMass(), getConfigSize(), getCurrentConfig(), getJacobianCenterOfMass(), getJointConfigSize(), getJointInnerObjects(), getJointNames(), getJointNumberDof(), getJointOuterObjects(), getJointPosition(), getLinkName(), getLinkPosition(), getMass(), getNumberDof(), getObjectPosition(), insertObjectModel(), insertRobotModel(), isConfigValid(), loadEnvironmentModel(), loadHumanoidModel(), loadModel(), manipulation::robot::HumanoidRobot::loadModel(), rebuildRanks(), removeObstacleFromJoint(), setCurrentConfig(), setJointBounds(), setJointPosition(), setTranslationBounds(), and shootRandomConfig().
Referenced by rebuildRanks(), and setTranslationBounds().
Referenced by rebuildRanks().
Referenced by insertObjectModel(), insertRobotModel(), loadEnvironmentModel(), and loadHumanoidModel().
Referenced by loadModel(), and manipulation::robot::HumanoidRobot::loadModel().
Referenced by rebuildRanks().
Referenced by rebuildRanks().
Referenced by insertObjectModel(), insertRobotModel(), loadEnvironmentModel(), and loadHumanoidModel().