hpp-pinocchio  4.9.1
Wrapping of the kinematic/dynamic chain Pinocchio for HPP.
hpp::pinocchio::urdf Namespace Reference

Functions

void loadRobotModel (const DevicePtr_t &robot, const FrameIndex &baseFrame, const std::string &prefix, const std::string &rootJointType, const std::string &package, const std::string &modelName, const std::string &urdfSuffix, const std::string &srdfSuffix)
 
void loadRobotModel (const DevicePtr_t &robot, const std::string &rootJointType, const std::string &package, const std::string &modelName, const std::string &urdfSuffix, const std::string &srdfSuffix)
 
void setupHumanoidRobot (const HumanoidRobotPtr_t &robot, const std::string &prefix="")
 
void loadUrdfModel (const DevicePtr_t &robot, const FrameIndex &baseFrame, const std::string &prefix, const std::string &rootJointType, const std::string &package, const std::string &filename)
 
void loadUrdfModel (const DevicePtr_t &robot, const std::string &rootJointType, const std::string &package, const std::string &filename)
 
void loadModel (const DevicePtr_t &robot, const FrameIndex &baseFrame, const std::string &prefix, const std::string &rootType, const std::string &urdfPath, const std::string &srdfPath)
 
void loadModelFromString (const DevicePtr_t &robot, const FrameIndex &baseFrame, const std::string &prefix, const std::string &rootType, const std::string &urdfString, const std::string &srdfString)
 

Function Documentation

◆ loadModel()

void hpp::pinocchio::urdf::loadModel ( const DevicePtr_t robot,
const FrameIndex baseFrame,
const std::string &  prefix,
const std::string &  rootType,
const std::string &  urdfPath,
const std::string &  srdfPath 
)

This is the base function which is called by the other function. It reads a URDF file, and optionnally a SRDF file, and build the robot.

Parameters
srdfPathif empty, do not try to parse SRDF.

◆ loadModelFromString()

void hpp::pinocchio::urdf::loadModelFromString ( const DevicePtr_t robot,
const FrameIndex baseFrame,
const std::string &  prefix,
const std::string &  rootType,
const std::string &  urdfString,
const std::string &  srdfString 
)

Read URDF and, optionnally SRDF, as XML string.

Parameters
srdfStringif empty, do not try to parse SRDF.

◆ loadRobotModel() [1/2]

void hpp::pinocchio::urdf::loadRobotModel ( const DevicePtr_t robot,
const FrameIndex baseFrame,
const std::string &  prefix,
const std::string &  rootJointType,
const std::string &  package,
const std::string &  modelName,
const std::string &  urdfSuffix,
const std::string &  srdfSuffix 
)

Load robot model by name

Parameters
robotEmpty robot created before calling the function. Users can pass an instance of a class deriving from Device.
baseFrameframe to which the joint tree is added.
prefixstring to insert before all names (joint, link, body names)
rootJointTypetype of root joint among "anchor", "freeflyer", "planar",
packageros package containing the model
modelNamerobot model name
urdfSuffixsuffix for urdf file
srdfSuffixsuffix for srdf file
Note
This function reads the following files:
  • package://${package}/urdf/${modelName}${urdfSuffix}.urdf
  • package://${package}/srdf/${modelName}${srdfSuffix}.srdf

◆ loadRobotModel() [2/2]

void hpp::pinocchio::urdf::loadRobotModel ( const DevicePtr_t robot,
const std::string &  rootJointType,
const std::string &  package,
const std::string &  modelName,
const std::string &  urdfSuffix,
const std::string &  srdfSuffix 
)

◆ loadUrdfModel() [1/2]

void hpp::pinocchio::urdf::loadUrdfModel ( const DevicePtr_t robot,
const FrameIndex baseFrame,
const std::string &  prefix,
const std::string &  rootJointType,
const std::string &  package,
const std::string &  filename 
)

Load only urdf model file

Parameters
robotEmpty robot created before calling the function. Users can pass an instance of a class deriving from Device.
baseFrameframe to which the joint tree is added.
prefixstring to insert before all names (joint, link, body names)
rootJointTypetype of root joint among "anchor", "freeflyer", "planar",
packageros package containing the model
filenamename of the file containing the model.
Note
This function reads the following file:
  • package://${package}/urdf/${filename}.urdf

◆ loadUrdfModel() [2/2]

void hpp::pinocchio::urdf::loadUrdfModel ( const DevicePtr_t robot,
const std::string &  rootJointType,
const std::string &  package,
const std::string &  filename 
)

◆ setupHumanoidRobot()

void hpp::pinocchio::urdf::setupHumanoidRobot ( const HumanoidRobotPtr_t robot,
const std::string &  prefix = "" 
)

Set the special joints of the robot (chest, waist...) and initialize the gaze origin and direction