pinocchio  2.1.3
pinocchio::urdf Namespace Reference

URDF parsing. More...

Enumerations

enum  CartesianAxis {
  AXIS_X =0,
  AXIS_Y =1,
  AXIS_Z =2,
  AXIS_UNALIGNED
}
 The four possible cartesian types of an 3D axis.
 

Functions

template<typename Scalar , int Options, template< typename, int > class JointCollectionTpl>
GeometryModelbuildGeom (const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const std::string &filename, const GeometryType type, GeometryModel &geomModel, const std::vector< std::string > &packageDirs=std::vector< std::string >(),::hpp::fcl::MeshLoaderPtr meshLoader=::hpp::fcl::MeshLoaderPtr())
 Build The GeometryModel from a URDF file. Search for meshes in the directories specified by the user first and then in the environment variable ROS_PACKAGE_PATH. More...
 
template<typename Scalar , int Options, template< typename, int > class JointCollectionTpl>
GeometryModelbuildGeom (const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const std::string &filename, const GeometryType type, GeometryModel &geomModel, const std::string &packageDir, hpp::fcl::MeshLoaderPtr meshLoader=hpp::fcl::MeshLoaderPtr())
 Build The GeometryModel from a URDF file. Search for meshes in the directories specified by the user first and then in the environment variable ROS_PACKAGE_PATH. More...
 
template<typename Scalar , int Options, template< typename, int > class JointCollectionTpl>
GeometryModelbuildGeom (const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const std::istream &xmlStream, const GeometryType type, GeometryModel &geomModel, const std::vector< std::string > &packageDirs=std::vector< std::string >(), hpp::fcl::MeshLoaderPtr meshLoader=hpp::fcl::MeshLoaderPtr())
 Build The GeometryModel from a URDF model. Search for meshes in the directories specified by the user first and then in the environment variable ROS_PACKAGE_PATH. More...
 
template<typename Scalar , int Options, template< typename, int > class JointCollectionTpl>
GeometryModelbuildGeom (const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const std::istream &xmlStream, const GeometryType type, GeometryModel &geomModel, const std::string &packageDir, hpp::fcl::MeshLoaderPtr meshLoader=hpp::fcl::MeshLoaderPtr())
 Build The GeometryModel from a URDF model. Search for meshes in the directories specified by the user first and then in the environment variable ROS_PACKAGE_PATH. More...
 
template<typename Scalar , int Options, template< typename, int > class JointCollectionTpl>
ModelTpl< Scalar, Options, JointCollectionTpl > & buildModel (const std::string &filename, const typename ModelTpl< Scalar, Options, JointCollectionTpl >::JointModel &rootJoint, ModelTpl< Scalar, Options, JointCollectionTpl > &model, const bool verbose=false)
 Build the model from a URDF file with a particular joint as root of the model tree inside the model given as reference argument. More...
 
template<typename Scalar , int Options, template< typename, int > class JointCollectionTpl>
ModelTpl< Scalar, Options, JointCollectionTpl > & buildModel (const std::string &filename, ModelTpl< Scalar, Options, JointCollectionTpl > &model, const bool verbose=false)
 Build the model from a URDF file with a fixed joint as root of the model tree. More...
 
template<typename Scalar , int Options, template< typename, int > class JointCollectionTpl>
ModelTpl< Scalar, Options, JointCollectionTpl > & buildModel (const ::urdf::ModelInterfaceSharedPtr &urdfTree, const typename ModelTpl< Scalar, Options, JointCollectionTpl >::JointModel &rootJoint, ModelTpl< Scalar, Options, JointCollectionTpl > &model, const bool verbose=false)
 Build the model from a URDF model with a particular joint as root of the model tree inside the model given as reference argument. More...
 
template<typename Scalar , int Options, template< typename, int > class JointCollectionTpl>
ModelTpl< Scalar, Options, JointCollectionTpl > & buildModel (const ::urdf::ModelInterfaceSharedPtr &urdfTree, ModelTpl< Scalar, Options, JointCollectionTpl > &model, const bool verbose=false)
 Build the model from a URDF model. More...
 
template<typename Scalar , int Options, template< typename, int > class JointCollectionTpl>
ModelTpl< Scalar, Options, JointCollectionTpl > & buildModelFromXML (const std::string &xmlStream, const JointModelVariant &rootJoint, ModelTpl< Scalar, Options, JointCollectionTpl > &model, const bool verbose=false)
 Build the model from an XML stream with a particular joint as root of the model tree inside the model given as reference argument. More...
 
template<typename Scalar , int Options, template< typename, int > class JointCollectionTpl>
ModelTpl< Scalar, Options, JointCollectionTpl > & buildModelFromXML (const std::string &xmlStream, ModelTpl< Scalar, Options, JointCollectionTpl > &model, const bool verbose=false)
 Build the model from an XML stream. More...
 
Inertia convertFromUrdf (const ::urdf::Inertial &Y)
 Convert URDF Inertial quantity to Spatial Inertia. More...
 
SE3 convertFromUrdf (const ::urdf::Pose &M)
 Convert URDF Pose quantity to SE3. More...
 
CartesianAxis extractCartesianAxis (const ::urdf::Vector3 &axis)
 Extract the cartesian property of a particular 3D axis. More...
 

Detailed Description

URDF parsing.

Function Documentation

GeometryModel& pinocchio::urdf::buildGeom ( const ModelTpl< Scalar, Options, JointCollectionTpl > &  model,
const std::string &  filename,
const GeometryType  type,
GeometryModel geomModel,
const std::vector< std::string > &  packageDirs = std::vector< std::string >(),
::hpp::fcl::MeshLoaderPtr  meshLoader = ::hpp::fcl::MeshLoaderPtr() 
)

Build The GeometryModel from a URDF file. Search for meshes in the directories specified by the user first and then in the environment variable ROS_PACKAGE_PATH.

Parameters
[in]modelThe model of the robot, built with urdf::buildModel
[in]filenameThe URDF complete (absolute) file path
[in]packageDirsA vector containing the different directories where to search for models and meshes, typically obtained from calling pinocchio::rosPaths()
[in]typeThe type of objects that must be loaded (must be VISUAL or COLLISION)
[in]meshLoaderobject used to load meshes: hpp::fcl::MeshLoader [default] or hpp::fcl::CachedMeshLoader.
[out]geomModelReference where to put the parsed information.
Returns
Returns the reference on geom model for convenience.
Warning
If hpp-fcl has not been found during compilation, COLLISION objects can not be loaded

Referenced by buildGeom().

GeometryModel& pinocchio::urdf::buildGeom ( const ModelTpl< Scalar, Options, JointCollectionTpl > &  model,
const std::string &  filename,
const GeometryType  type,
GeometryModel geomModel,
const std::string &  packageDir,
hpp::fcl::MeshLoaderPtr  meshLoader = hpp::fcl::MeshLoaderPtr() 
)

Build The GeometryModel from a URDF file. Search for meshes in the directories specified by the user first and then in the environment variable ROS_PACKAGE_PATH.

Parameters
[in]modelThe model of the robot, built with urdf::buildModel
[in]filenameThe URDF complete (absolute) file path
[in]packageDirA string containing the path to the directories of the meshes, typically obtained from calling pinocchio::rosPaths().
[in]typeThe type of objects that must be loaded (must be VISUAL or COLLISION)
[in]meshLoaderobject used to load meshes: hpp::fcl::MeshLoader [default] or hpp::fcl::CachedMeshLoader.
[out]geomModelReference where to put the parsed information.
Returns
Returns the reference on geom model for convenience.
Warning
If hpp-fcl has not been found during compilation, COLLISION objects can not be loaded

Definition at line 185 of file urdf.hpp.

References buildGeom().

GeometryModel& pinocchio::urdf::buildGeom ( const ModelTpl< Scalar, Options, JointCollectionTpl > &  model,
const std::istream &  xmlStream,
const GeometryType  type,
GeometryModel geomModel,
const std::vector< std::string > &  packageDirs = std::vector< std::string >(),
hpp::fcl::MeshLoaderPtr  meshLoader = hpp::fcl::MeshLoaderPtr() 
)

Build The GeometryModel from a URDF model. Search for meshes in the directories specified by the user first and then in the environment variable ROS_PACKAGE_PATH.

Parameters
[in]modelThe model of the robot, built with urdf::buildModel
[in]xmlStreamStream containing the URDF model
[in]packageDirsA vector containing the different directories where to search for models and meshes, typically obtained from calling pinocchio::rosPaths()
[in]typeThe type of objects that must be loaded (must be VISUAL or COLLISION)
[in]meshLoaderobject used to load meshes: hpp::fcl::MeshLoader [default] or hpp::fcl::CachedMeshLoader.
[out]geomModelReference where to put the parsed information.
Returns
Returns the reference on geom model for convenience.
Warning
If hpp-fcl has not been found during compilation, COLLISION objects cannot be loaded
GeometryModel& pinocchio::urdf::buildGeom ( const ModelTpl< Scalar, Options, JointCollectionTpl > &  model,
const std::istream &  xmlStream,
const GeometryType  type,
GeometryModel geomModel,
const std::string &  packageDir,
hpp::fcl::MeshLoaderPtr  meshLoader = hpp::fcl::MeshLoaderPtr() 
)

Build The GeometryModel from a URDF model. Search for meshes in the directories specified by the user first and then in the environment variable ROS_PACKAGE_PATH.

Parameters
[in]modelThe model of the robot, built with urdf::buildModel
[in]xmlStreamStream containing the URDF model
[in]packageDirA string containing the path to the directories of the meshes, typically obtained from calling pinocchio::rosPaths().
[in]typeThe type of objects that must be loaded (must be VISUAL or COLLISION)
[in]meshLoaderobject used to load meshes: hpp::fcl::MeshLoader [default] or hpp::fcl::CachedMeshLoader.
[out]geomModelReference where to put the parsed information.
Returns
Returns the reference on geom model for convenience.
Warning
If hpp-fcl has not been found during compilation, COLLISION objects cannot be loaded

Definition at line 247 of file urdf.hpp.

ModelTpl<Scalar,Options,JointCollectionTpl>& pinocchio::urdf::buildModel ( const std::string &  filename,
const typename ModelTpl< Scalar, Options, JointCollectionTpl >::JointModel rootJoint,
ModelTpl< Scalar, Options, JointCollectionTpl > &  model,
const bool  verbose = false 
)

Build the model from a URDF file with a particular joint as root of the model tree inside the model given as reference argument.

Parameters
[in]filemaneThe URDF complete file path.
[in]rootJointThe joint at the root of the model tree.
[in]verbosePrint parsing info.
[out]modelReference model where to put the parsed information.
Returns
Return the reference on argument model for convenience.
ModelTpl<Scalar,Options,JointCollectionTpl>& pinocchio::urdf::buildModel ( const std::string &  filename,
ModelTpl< Scalar, Options, JointCollectionTpl > &  model,
const bool  verbose = false 
)

Build the model from a URDF file with a fixed joint as root of the model tree.

Parameters
[in]filemaneThe URDF complete file path.
[in]verbosePrint parsing info.
[out]modelReference model where to put the parsed information.
Returns
Return the reference on argument model for convenience.
ModelTpl<Scalar,Options,JointCollectionTpl>& pinocchio::urdf::buildModel ( const ::urdf::ModelInterfaceSharedPtr &  urdfTree,
const typename ModelTpl< Scalar, Options, JointCollectionTpl >::JointModel rootJoint,
ModelTpl< Scalar, Options, JointCollectionTpl > &  model,
const bool  verbose = false 
)

Build the model from a URDF model with a particular joint as root of the model tree inside the model given as reference argument.

Parameters
[in]urdfTreethe tree build from the URDF
[in]rootJointThe joint at the root of the model tree.
[in]verbosePrint parsing info.
[out]modelReference model where to put the parsed information.
Returns
Return the reference on argument model for convenience.
Note
urdfTree can be build from ::urdf::parseURDF or ::urdf::parseURDFFile
ModelTpl<Scalar,Options,JointCollectionTpl>& pinocchio::urdf::buildModel ( const ::urdf::ModelInterfaceSharedPtr &  urdfTree,
ModelTpl< Scalar, Options, JointCollectionTpl > &  model,
const bool  verbose = false 
)

Build the model from a URDF model.

Parameters
[in]urdfTreethe tree build from the URDF
[in]verbosePrint parsing info.
[out]modelReference model where to put the parsed information.
Returns
Return the reference on argument model for convenience.
Note
urdfTree can be build from ::urdf::parseURDF or ::urdf::parseURDFFile
ModelTpl<Scalar,Options,JointCollectionTpl>& pinocchio::urdf::buildModelFromXML ( const std::string &  xmlStream,
const JointModelVariant &  rootJoint,
ModelTpl< Scalar, Options, JointCollectionTpl > &  model,
const bool  verbose = false 
)

Build the model from an XML stream with a particular joint as root of the model tree inside the model given as reference argument.

Parameters
[in]xmlStreamstream containing the URDF model.
[in]rootJointThe joint at the root of the model tree.
[in]verbosePrint parsing info.
[out]modelReference model where to put the parsed information.
Returns
Return the reference on argument model for convenience.
Note
urdfTree can be build from ::urdf::parseURDF or ::urdf::parseURDFFile
ModelTpl<Scalar,Options,JointCollectionTpl>& pinocchio::urdf::buildModelFromXML ( const std::string &  xmlStream,
ModelTpl< Scalar, Options, JointCollectionTpl > &  model,
const bool  verbose = false 
)

Build the model from an XML stream.

Parameters
[in]xmlStreamstream containing the URDF model.
[in]verbosePrint parsing info.
[out]modelReference model where to put the parsed information.
Returns
Return the reference on argument model for convenience.
Note
urdfTree can be build from ::urdf::parseURDF or ::urdf::parseURDFFile
Inertia pinocchio::urdf::convertFromUrdf ( const ::urdf::Inertial &  Y)
inline

Convert URDF Inertial quantity to Spatial Inertia.

Parameters
[in]YThe input URDF Inertia.
Returns
The converted Spatial Inertia pinocchio::Inertia.

Definition at line 25 of file urdf/utils.hpp.

SE3 pinocchio::urdf::convertFromUrdf ( const ::urdf::Pose &  M)
inline

Convert URDF Pose quantity to SE3.

Parameters
[in]MThe input URDF Pose.
Returns
The converted pose/transform pinocchio::SE3.

Definition at line 47 of file urdf/utils.hpp.

CartesianAxis pinocchio::urdf::extractCartesianAxis ( const ::urdf::Vector3 &  axis)
inline

Extract the cartesian property of a particular 3D axis.

Parameters
[in]axisThe input URDF axis.
Returns
The property of the particular axis pinocchio::urdf::CartesianAxis.

Definition at line 66 of file urdf/utils.hpp.