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 boost::shared_ptr< ::urdf::Geometry > urdf_geometry, const std::vector< std::string > &package_dirs, std::string &mesh_path)
 Get a fcl::CollisionObject from an urdf geometry, searching for it in specified package directories.
void parseTreeForGeom (::urdf::LinkConstPtr link, const Model &model, GeometryModel &model_geom, const std::vector< std::string > &package_dirs) 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.
GeometryModel buildGeom (const Model &model, const std::string &filename, const std::vector< std::string > &package_dirs=std::vector< std::string >()) throw (std::invalid_argument)
 Build The GeometryModel from a URDF file.
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

GeometryModel se3::urdf::buildGeom ( const Model &  model,
const std::string &  filename,
const std::vector< std::string > &  package_dirs = std::vector<std::string> () 
) throw (std::invalid_argument) [inline]

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]package_dirsA vector containing the different directories where to search for models and meshes.
Returns:
The GeometryModel associated to the urdf file and the given Model.

References se3::extractPathFromEnvVar(), and parseTreeForGeom().

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().

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< double, 0 >::Zero().

Referenced by buildModel(), 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,
const Model &  model,
GeometryModel &  model_geom,
const std::vector< std::string > &  package_dirs 
) 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 GeometryModel associated
model_geomThe GeometryModel where the Collision Objects must be added
[in]package_dirsA vector containing the different directories where to search for packages
[in]rootJointAddedIf a root joint was added at the begining of the urdf kinematic chain by user when constructing the Model

References convertFromUrdf(), and retrieveCollisionGeometry().

Referenced by buildGeom().

fcl::CollisionObject se3::urdf::retrieveCollisionGeometry ( const boost::shared_ptr< ::urdf::Geometry >  urdf_geometry,
const std::vector< std::string > &  package_dirs,
std::string &  mesh_path 
) [inline]

Get a fcl::CollisionObject from an urdf geometry, searching for it in specified package directories.

Parameters:
[in]urdf_geometryThe input urdf geometry
[in]package_dirsA vector containing the different directories where to search for packages
[out]mesh_pathThe Absolute path of the mesh currently read
Returns:
The geometry converted as a fcl::CollisionObject

References se3::convertURDFMeshPathToAbsolutePath(), and se3::loadPolyhedronFromResource().

Referenced by parseTreeForGeom().