se3::urdf Namespace Reference

Enumerations

enum  AxisCartesian {
  AXIS_X,
  AXIS_Y,
  AXIS_Z,
  AXIS_UNALIGNED
}
 The four possible cartesian types of an 3D axis. More...

Functions

fcl::CollisionObject retrieveCollisionGeometry (const ::urdf::LinkConstPtr &link, const std::string &meshRootDir)
 Get a CollisionObject from an urdf link, reading the corresponding mesh.
void parseTreeForGeom (::urdf::LinkConstPtr link, Model &model, GeometryModel &model_geom, const std::string &meshRootDir, const bool rootJointAdded) throw (std::invalid_argument)
 Recursive procedure for reading the URDF tree, looking for geometries This function fill the geometric model whith geometry objects retrieved from the URDF tree.
template<typename D >
std::pair< Model, GeometryModelbuildModelAndGeom (const std::string &filename, const std::string &meshRootDir, const JointModelBase< D > &root_joint)
 Build The Model and GeometryModel from a URDF file with a particular joint as root of the model tree.
std::pair< Model, GeometryModelbuildModelAndGeom (const std::string &filename, const std::string &meshRootDir)
 Build The Model and GeometryModel from a URDF file with no root joint added to the model tree.
Inertia convertFromUrdf (const ::urdf::Inertial &Y)
 Convert URDF Inertial quantity to Spatial Inertia.
SE3 convertFromUrdf (const ::urdf::Pose &M)
 Convert URDF Pose quantity to SE3.
AxisCartesian extractCartesianAxis (const ::urdf::Vector3 &axis)
 Extract the cartesian property of a particular 3D axis.
void parseTree (::urdf::LinkConstPtr link, Model &model, const SE3 &placementOffset=SE3::Identity(), bool verbose=false) throw (std::invalid_argument)
 Recursive procedure for reading the URDF tree.
template<typename D >
void parseTree (::urdf::LinkConstPtr link, Model &model, const SE3 &placementOffset, const JointModelBase< D > &root_joint, const bool verbose=false) throw (std::invalid_argument)
 Parse a tree with a specific root joint linking the model to the environment.
template<typename D >
Model buildModel (const std::string &filename, const JointModelBase< D > &root_joint, bool verbose=false) throw (std::invalid_argument)
 Build the model from a URDF file with a particular joint as root of the model tree.
Model buildModel (const std::string &filename, const bool verbose=false) throw (std::invalid_argument)
 Build the model from a URDF file with a fixed joint as root of the model tree.

Enumeration Type Documentation

The four possible cartesian types of an 3D axis.

Enumerator:
AXIS_X 
AXIS_Y 
AXIS_Z 
AXIS_UNALIGNED 

Function Documentation

template<typename D >
Model se3::urdf::buildModel ( const std::string &  filename,
const JointModelBase< D > &  root_joint,
bool  verbose = false 
) throw (std::invalid_argument)

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

Parameters:
[in]filemaneThe URDF complete file path.
[in]root_jointThe joint at the root of the model tree.
Returns:
The se3::Model of the URDF file.

References se3::SE3Tpl< _Scalar, _Options >::Identity(), and parseTree().

Model se3::urdf::buildModel ( const std::string &  filename,
const bool  verbose = false 
) throw (std::invalid_argument) [inline]

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

Parameters:
[in]filemaneThe URDF complete file path.
Returns:
The se3::Model of the URDF file.

References se3::SE3Tpl< _Scalar, _Options >::Identity(), and parseTree().

template<typename D >
std::pair< Model, GeometryModel > se3::urdf::buildModelAndGeom ( const std::string &  filename,
const std::string &  meshRootDir,
const JointModelBase< D > &  root_joint 
)

Build The Model and GeometryModel from a URDF file with a particular joint as root of the model tree.

Parameters:
[in]filenameThe URDF complete file path
[in]meshRootDirRoot path to the directory where meshes are located
Returns:
The pair <se3::Model, se3::GeometryModel> the Model tree and its geometric model associated

References se3::SE3Tpl< _Scalar, _Options >::Identity(), parseTree(), and parseTreeForGeom().

std::pair< Model, GeometryModel > se3::urdf::buildModelAndGeom ( const std::string &  filename,
const std::string &  meshRootDir 
) [inline]

Build The Model and GeometryModel from a URDF file with no root joint added to the model tree.

Parameters:
[in]filenameThe URDF complete file path
[in]meshRootDirRoot path to the directory where meshes are located
Returns:
The pair <se3::Model, se3::GeometryModel> the Model tree and its geometric model associated

References se3::SE3Tpl< _Scalar, _Options >::Identity(), parseTree(), and parseTreeForGeom().

Inertia se3::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 se3::Inertia.

Referenced by parseTree(), and parseTreeForGeom().

SE3 se3::urdf::convertFromUrdf ( const ::urdf::Pose &  M) [inline]

Convert URDF Pose quantity to SE3.

Parameters:
[in]MThe input URDF Pose.
Returns:
The converted pose/transform se3::SE3.
AxisCartesian se3::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 se3::urdf::AxisCartesian.

References AXIS_UNALIGNED, AXIS_X, AXIS_Y, and AXIS_Z.

Referenced by parseTree().

void se3::urdf::parseTree ( ::urdf::LinkConstPtr  link,
Model &  model,
const SE3 &  placementOffset = SE3::Identity(),
bool  verbose = false 
) throw (std::invalid_argument) [inline]

Recursive procedure for reading the URDF tree.

The function returns an exception as soon as a necessary Inertia or Joint information are missing.

Parameters:
[in]linkThe current URDF link.
[in]modelThe model where the link must be added.
[in]placementOffsetThe relative placement of the link relative to the closer non fixed joint in the tree.

References AXIS_UNALIGNED, AXIS_X, AXIS_Y, AXIS_Z, convertFromUrdf(), se3::Symmetric3Tpl< _Scalar, _Options >::data(), extractCartesianAxis(), se3::SE3Tpl< _Scalar, _Options >::Identity(), se3::InertiaTpl< _Scalar, _Options >::inertia(), se3::InertiaTpl< _Scalar, _Options >::lever(), se3::InertiaTpl< _Scalar, _Options >::mass(), and se3::InertiaTpl< _Scalar, _Options >::Zero().

Referenced by buildModel(), buildModelAndGeom(), and parseTree().

template<typename D >
void se3::urdf::parseTree ( ::urdf::LinkConstPtr  link,
Model &  model,
const SE3 &  placementOffset,
const JointModelBase< D > &  root_joint,
const bool  verbose = false 
) throw (std::invalid_argument)

Parse a tree with a specific root joint linking the model to the environment.

The function returns an exception as soon as a necessary Inertia or Joint information are missing.

Parameters:
[in]linkThe current URDF link.
[in]modelThe model where the link must be added.
[in]placementOffsetThe relative placement of the link relative to the closer non fixed joint in the tree.
[in]root_jointThe specific root joint.

References convertFromUrdf(), se3::SE3Tpl< _Scalar, _Options >::Identity(), and parseTree().

void se3::urdf::parseTreeForGeom ( ::urdf::LinkConstPtr  link,
Model &  model,
GeometryModel &  model_geom,
const std::string &  meshRootDir,
const bool  rootJointAdded 
) throw (std::invalid_argument) [inline]

Recursive procedure for reading the URDF tree, looking for geometries This function fill the geometric model whith geometry objects retrieved from the URDF tree.

Parameters:
[in]linkThe current URDF link
modelThe model to which is the Geometry Model associated
model_geomThe Geometry Model where the Collision Objects must be added
[in]meshRootDirRoot path to the directory where meshes are located

References convertFromUrdf(), and retrieveCollisionGeometry().

Referenced by buildModelAndGeom().

fcl::CollisionObject se3::urdf::retrieveCollisionGeometry ( const ::urdf::LinkConstPtr link,
const std::string &  meshRootDir 
) [inline]

Get a CollisionObject from an urdf link, reading the corresponding mesh.

Parameters:
[in]linkThe input urdf link
[in]meshRootDirRoot path to the directory where meshes are located
Returns:
The mesh converted as a fcl::CollisionObject

References fromURDFMeshPathToAbsolutePath(), and loadPolyhedronFromResource().

Referenced by parseTreeForGeom().