17 #ifndef SDF_PARSER_HH_ 18 #define SDF_PARSER_HH_ 23 #include "sdf/sdf_config.h" 39 inline namespace SDF_VERSION_NAMESPACE {
63 const std::string &_filename,
const ParserConfig &_config,
SDFPtr _sdf);
78 bool initFile(
const std::string &_filename,
const ParserConfig &_config,
95 const std::string &_xmlString,
const ParserConfig &_config,
SDFPtr _sdf);
129 const ParserConfig &_config,
Errors &_errors);
154 bool readFile(
const std::string &_filename,
const ParserConfig &_config,
170 const std::string &_filename,
SDFPtr _sdf,
Errors &_errors);
186 const ParserConfig &_config,
SDFPtr _sdf,
Errors &_errors);
222 bool readString(
const std::string &_xmlString,
const ParserConfig &_config,
260 bool readString(
const std::string &_xmlString,
const ParserConfig &_config,
276 const std::string &_xmlString,
SDFPtr _sdf,
Errors &_errors);
290 const ParserConfig &_config,
SDFPtr _sdf,
Errors &_errors);
317 bool convertFile(
const std::string &_filename,
const std::string &_version,
327 bool convertFile(
const std::string &_filename,
const std::string &_version,
328 const ParserConfig &_config,
SDFPtr _sdf);
337 const std::string &_version,
SDFPtr _sdf);
346 bool convertString(
const std::string &_sdfString,
const std::string &_version,
347 const ParserConfig &_config,
SDFPtr _sdf);
bool checkFrameAttachedToGraph(const sdf::Root *_root)
For the world and each model, check that the attached_to graphs build without errors and have no cycl...
bool readString(const std::string &_xmlString, ElementPtr _sdf)
Populate the SDF values from a string.
bool initFile(const std::string &_filename, const ParserConfig &_config, ElementPtr _sdf)
Initialize an SDFElement interface using a file.
bool readFile(const std::string &_filename, SDFPtr _sdf)
Populate the SDF values from a file.
bool init(SDFPtr _sdf)
Initialize the SDF interface from the embedded root spec file.
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:54
bool readFileWithoutConversion(const std::string &_filename, const ParserConfig &_config, SDFPtr _sdf, Errors &_errors)
Populate the SDF values from a file without converting to the latest SDF version. ...
bool readStringWithoutConversion(const std::string &_xmlString, const ParserConfig &_config, SDFPtr _sdf, Errors &_errors)
Populate the SDF values from a string.
bool checkFrameAttachedToNames(const sdf::Root *_root)
Check that for each frame, the attached_to attribute value does not match its own frame name but does...
bool checkJointParentChildLinkNames(const sdf::Root *_root)
Check that all joints in contained models specify parent and child link names that match the names of...
void checkJointParentChildNames(const sdf::Root *_root, Errors &_errors)
Check that all joints in contained models specify parent and child names that match the names of sibl...
bool checkCanonicalLinkNames(const sdf::Root *_root)
Check that for each model, the canonical_link attribute value matches the name of a link in the model...
bool convertString(const std::string &_sdfString, const std::string &_version, const ParserConfig &_config, SDFPtr _sdf)
Convert an SDF string to a specific SDF version.
bool recursiveSiblingNoDoubleColonInNames(sdf::ElementPtr _elem)
Check that all sibling elements do not contain the delimiter double colons '::' in element names...
bool convertFile(const std::string &_filename, const std::string &_version, const ParserConfig &_config, SDFPtr _sdf)
Convert an SDF file to a specific SDF version.
std::string getModelFilePath(const std::string &_modelDirPath)
Get the file path to the model file.
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system_util.hh:41
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:106
bool initString(const std::string &_xmlString, const ParserConfig &_config, SDFPtr _sdf)
Initialize the SDF interface using a string.
bool recursiveSiblingUniqueNames(sdf::ElementPtr _elem)
Check that all sibling elements of the any type have unique names.
bool shouldValidateElement(sdf::ElementPtr _elem)
Check whether the element should be validated.
namespace for Simulation Description Format parser
Definition: Actor.hh:33
bool recursiveSameTypeUniqueNames(sdf::ElementPtr _elem)
Check that all sibling elements of the same type have unique names.
std::shared_ptr< SDF > SDFPtr
Definition: SDFImpl.hh:52
bool checkPoseRelativeToGraph(const sdf::Root *_root)
For the world and each model, check that the attached_to graphs build without errors and have no cycl...