rbd::parsers Namespace Reference

Classes

struct  Geometry
 
struct  Limits
 
struct  Material
 
struct  ParserParameters
 
struct  ParserResult
 
class  RBDynFromYAML
 
struct  Visual
 

Enumerations

enum  ParserInput { ParserInput::File, ParserInput::Description }
 

Functions

RBDYN_PARSERS_DLLAPI ParserResult from_file (const std::string &file_path, bool fixed=true, const std::vector< std::string > &filtered_links={}, bool transform_inertia=true, const std::string &base_link="", bool with_virtual_links=true, const std::string spherical_suffix="_spherical")
 Checks the file extension and parses it as URDF or YAML accordingly. More...
 
RBDYN_PARSERS_DLLAPI ParserResult from_file (const std::string &file_path, const ParserParameters &params)
 Checks the file extension and parses it as URDF or YAML accordingly. More...
 
RBDYN_PARSERS_DLLAPI std::string prefix_path (const std::string &path)
 Ensures that a path is prefixed by either package:// or file://. More...
 
RBDYN_PARSERS_DLLAPI std::vector< double > attrToList (const tinyxml2::XMLElement &dom, const std::string &attr, const std::vector< double > &def={})
 
RBDYN_PARSERS_DLLAPI Eigen::Vector3d attrToVector (const tinyxml2::XMLElement &dom, const std::string &attr, const Eigen::Vector3d &def=Eigen::Vector3d(0, 0, 0))
 
RBDYN_PARSERS_DLLAPI ParserResult from_urdf (const std::string &content, bool fixed=true, const std::vector< std::string > &filteredLinksIn={}, bool transformInertia=true, const std::string &baseLinkIn="", bool withVirtualLinks=true, const std::string &sphericalSuffix="_spherical")
 
RBDYN_PARSERS_DLLAPI ParserResult from_urdf_file (const std::string &file_path, bool fixed=true, const std::vector< std::string > &filteredLinksIn={}, bool transformInertia=true, const std::string &baseLinkIn="", bool withVirtualLinks=true, const std::string &sphericalSuffix="_spherical")
 
RBDYN_PARSERS_DLLAPI ParserResult from_urdf (const std::string &content, const ParserParameters &params)
 
RBDYN_PARSERS_DLLAPI ParserResult from_urdf_file (const std::string &file_path, const ParserParameters &params)
 
RBDYN_PARSERS_DLLAPI std::string to_urdf (const ParserResult &res)
 
RBDYN_PARSERS_DLLAPI ParserResult from_yaml (const std::string &content, bool fixed=true, const std::vector< std::string > &filteredLinksIn={}, bool transformInertia=true, const std::string &baseLinkIn="", bool withVirtualLinks=true, const std::string &sphericalSuffix="_spherical")
 
RBDYN_PARSERS_DLLAPI ParserResult from_yaml_file (const std::string &file_path, bool fixed=true, const std::vector< std::string > &filteredLinksIn={}, bool transformInertia=true, const std::string &baseLinkIn="", bool withVirtualLinks=true, const std::string &sphericalSuffix="_spherical")
 
RBDYN_PARSERS_DLLAPI ParserResult from_yaml (const std::string &content, const ParserParameters &params)
 
RBDYN_PARSERS_DLLAPI ParserResult from_yaml_file (const std::string &file_path, const ParserParameters &params)
 
RBDYN_PARSERS_DLLAPI std::string to_yaml (const ParserResult &res)
 

Enumeration Type Documentation

◆ ParserInput

Enumerator
File 
Description 

Function Documentation

◆ attrToList()

RBDYN_PARSERS_DLLAPI std::vector<double> rbd::parsers::attrToList ( const tinyxml2::XMLElement &  dom,
const std::string &  attr,
const std::vector< double > &  def = {} 
)

◆ attrToVector()

RBDYN_PARSERS_DLLAPI Eigen::Vector3d rbd::parsers::attrToVector ( const tinyxml2::XMLElement &  dom,
const std::string &  attr,
const Eigen::Vector3d &  def = Eigen::Vector3d(0, 0, 0) 
)

◆ from_file() [1/2]

RBDYN_PARSERS_DLLAPI ParserResult rbd::parsers::from_file ( const std::string &  file_path,
bool  fixed = true,
const std::vector< std::string > &  filtered_links = {},
bool  transform_inertia = true,
const std::string &  base_link = "",
bool  with_virtual_links = true,
const std::string  spherical_suffix = "_spherical" 
)

Checks the file extension and parses it as URDF or YAML accordingly.

Parameters
file_pathPath to the file to parse
Returns
ParserResult The parsing result

◆ from_file() [2/2]

RBDYN_PARSERS_DLLAPI ParserResult rbd::parsers::from_file ( const std::string &  file_path,
const ParserParameters params 
)

Checks the file extension and parses it as URDF or YAML accordingly.

Parameters
file_pathPath to the file to parse
paramsParser parameters
Returns
ParserResult The parsing result

◆ from_urdf() [1/2]

RBDYN_PARSERS_DLLAPI ParserResult rbd::parsers::from_urdf ( const std::string &  content,
bool  fixed = true,
const std::vector< std::string > &  filteredLinksIn = {},
bool  transformInertia = true,
const std::string &  baseLinkIn = "",
bool  withVirtualLinks = true,
const std::string &  sphericalSuffix = "_spherical" 
)

◆ from_urdf() [2/2]

RBDYN_PARSERS_DLLAPI ParserResult rbd::parsers::from_urdf ( const std::string &  content,
const ParserParameters params 
)

◆ from_urdf_file() [1/2]

RBDYN_PARSERS_DLLAPI ParserResult rbd::parsers::from_urdf_file ( const std::string &  file_path,
bool  fixed = true,
const std::vector< std::string > &  filteredLinksIn = {},
bool  transformInertia = true,
const std::string &  baseLinkIn = "",
bool  withVirtualLinks = true,
const std::string &  sphericalSuffix = "_spherical" 
)

◆ from_urdf_file() [2/2]

RBDYN_PARSERS_DLLAPI ParserResult rbd::parsers::from_urdf_file ( const std::string &  file_path,
const ParserParameters params 
)

◆ from_yaml() [1/2]

RBDYN_PARSERS_DLLAPI ParserResult rbd::parsers::from_yaml ( const std::string &  content,
bool  fixed = true,
const std::vector< std::string > &  filteredLinksIn = {},
bool  transformInertia = true,
const std::string &  baseLinkIn = "",
bool  withVirtualLinks = true,
const std::string &  sphericalSuffix = "_spherical" 
)

◆ from_yaml() [2/2]

RBDYN_PARSERS_DLLAPI ParserResult rbd::parsers::from_yaml ( const std::string &  content,
const ParserParameters params 
)

◆ from_yaml_file() [1/2]

RBDYN_PARSERS_DLLAPI ParserResult rbd::parsers::from_yaml_file ( const std::string &  file_path,
bool  fixed = true,
const std::vector< std::string > &  filteredLinksIn = {},
bool  transformInertia = true,
const std::string &  baseLinkIn = "",
bool  withVirtualLinks = true,
const std::string &  sphericalSuffix = "_spherical" 
)

◆ from_yaml_file() [2/2]

RBDYN_PARSERS_DLLAPI ParserResult rbd::parsers::from_yaml_file ( const std::string &  file_path,
const ParserParameters params 
)

◆ prefix_path()

RBDYN_PARSERS_DLLAPI std::string rbd::parsers::prefix_path ( const std::string &  path)

Ensures that a path is prefixed by either package:// or file://.

Some ROS tools (such as rviz) require even local paths to be explicitely prefixed. Thus

  • If a path is already prefixed by file:// or package://, leave it unchanged.
  • If a path has no prefix, assume it is a local path and add the file:// prefix

◆ to_urdf()

RBDYN_PARSERS_DLLAPI std::string rbd::parsers::to_urdf ( const ParserResult res)

◆ to_yaml()

RBDYN_PARSERS_DLLAPI std::string rbd::parsers::to_yaml ( const ParserResult res)