gepetto::viewer::urdfParser Namespace Reference

Functions

std::string getFilename (const std::string &input)
 
GroupNodePtr_t parse (const std::string &robotName, const std::string &urdf_file, const bool &visual=true, const bool &linkFrame=true)
 

Function Documentation

◆ getFilename()

std::string gepetto::viewer::urdfParser::getFilename ( const std::string &  input)

If input starts with "package://", read ROS_PACKAGE_PATH environment variable and return a suitable file, if possible. Returns input on failure (no "package://" or no file found in the packages).

◆ parse()

GroupNodePtr_t gepetto::viewer::urdfParser::parse ( const std::string &  robotName,
const std::string &  urdf_file,
const bool &  visual = true,
const bool &  linkFrame = true 
)

Create a node from an urdf file

Parameters
robotNameName of the node that will contain the robot geometry, each geometric part is prefixed by this name,
urdf_filetwo possible inputs:
  • if it ends with ".urdf", it is interpreted as a filename, that will be processed with getFilename
  • otherwise, it is interpreted as a XML string.
visualwhether to parse the visual part or the collision part of links.
linkFramein the urdf kinematic chain, objects are rigidly attached to a link. This parameter determines whether the node frame corresponds to the link frame (if True) or to the object frame (If False).
Note
the parser will replace "package://" by a path from the ROS_PACKAGE_PATH environment variable.