Class URDFParser

Class Documentation

class URDFParser

Base class for URDF parsers.

Public Functions

inline URDFParser()
inline virtual ~URDFParser()
virtual urdf::ModelInterfaceSharedPtr parse(const std::string &data) = 0

Load Model from string.

Returns:

nullptr and write to stderr if the given string is invalid

virtual size_t might_handle(const std::string &data) = 0

Indicate if data is meant to be parsed by this parser.

Returns:

The position in the string that the plugin became confident the data is intended to be parsed by it. For example, the plugin parsing COLLADA files might return the position in the string that the ‘<COLLADA>’ xml tag was found. Smaller values are interpretted as more confidence, and the plugin with the smallest value is used to parse the data. If a plugin believes data is not meant for it, then it should return a value greater than or equal to data.size().