Go to the documentation of this file.
17 #ifndef SDF_PARSER_HH_
18 #define SDF_PARSER_HH_
39 inline namespace SDF_VERSION_NAMESPACE {
56 bool init(
SDFPtr _sdf,
const ParserConfig &_config);
80 const std::string &_filename,
const ParserConfig &_config,
SDFPtr _sdf);
90 const std::string &_filename,
const ParserConfig &_config,
SDFPtr _sdf,
106 bool initFile(
const std::string &_filename,
const ParserConfig &_config,
116 bool initFile(
const std::string &_filename,
const ParserConfig &_config,
133 const std::string &_xmlString,
const ParserConfig &_config,
SDFPtr _sdf);
142 bool initString(
const std::string &_xmlString,
const ParserConfig &_config,
177 const ParserConfig &_config,
Errors &_errors);
202 bool readFile(
const std::string &_filename,
const ParserConfig &_config,
218 const std::string &_filename,
SDFPtr _sdf,
Errors &_errors);
234 const ParserConfig &_config,
SDFPtr _sdf,
Errors &_errors);
270 bool readString(
const std::string &_xmlString,
const ParserConfig &_config,
308 bool readString(
const std::string &_xmlString,
const ParserConfig &_config,
324 const std::string &_xmlString,
SDFPtr _sdf,
Errors &_errors);
338 const ParserConfig &_config,
SDFPtr _sdf,
Errors &_errors);
367 const std::string &_modelDirPath);
375 bool convertFile(
const std::string &_filename,
const std::string &_version,
385 bool convertFile(
const std::string &_filename,
const std::string &_version,
386 const ParserConfig &_config,
SDFPtr _sdf);
396 SDFPtr _sdf,
const std::string &_filename,
const std::string &_version,
406 const std::string &_version,
SDFPtr _sdf);
415 bool convertString(
const std::string &_sdfString,
const std::string &_version,
416 const ParserConfig &_config,
SDFPtr _sdf);
426 SDFPtr _sdf,
const std::string &_sdfString,
const std::string &_version,
515 bool checkJointParentChildLinkNames(const
sdf::Root *_root);
class GZ_SDFORMAT_VISIBLE GZ_DEPRECATED(13) Inertia
A class for inertial information about a link.
Definition: Types.hh:147
GZ_SDFORMAT_VISIBLE bool convertFile(const std::string &_filename, const std::string &_version, SDFPtr _sdf)
Convert an SDF file to a specific SDF version.
std::shared_ptr< SDF > SDFPtr
Definition: SDFImpl.hh:52
GZ_SDFORMAT_VISIBLE 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...
GZ_SDFORMAT_VISIBLE bool init(SDFPtr _sdf)
Initialize the SDF interface from the embedded root spec file.
GZ_SDFORMAT_VISIBLE bool initString(const std::string &_xmlString, SDFPtr _sdf)
Initialize the SDF interface using a string.
namespace for Simulation Description Format parser
Definition: Actor.hh:34
GZ_SDFORMAT_VISIBLE std::string getModelFilePath(const std::string &_modelDirPath)
Get the file path to the model file.
GZ_SDFORMAT_VISIBLE void checkJointAxisExpressedInValues(const sdf::Root *_root, Errors &_errors)
Check that all joint axes in contained joints specify xyz expressed-in names that match the names of ...
GZ_SDFORMAT_VISIBLE 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...
GZ_SDFORMAT_VISIBLE bool recursiveSameTypeUniqueNames(sdf::ElementPtr _elem)
Check that all sibling elements of the same type have unique names.
#define SDFORMAT_VISIBLE
Definition: system_util.hh:25
GZ_SDFORMAT_VISIBLE bool convertString(const std::string &_sdfString, const std::string &_version, SDFPtr _sdf)
Convert an SDF string to a specific SDF version.
GZ_SDFORMAT_VISIBLE std::string computeMergedModelProxyFrameName(const std::string &_modelName)
Function to compute a merged model's proxy frame name.
GZ_SDFORMAT_VISIBLE bool readStringWithoutConversion(const std::string &_xmlString, SDFPtr _sdf, Errors &_errors)
Populate the SDF values from a string without converting to the latest SDF version.
GZ_SDFORMAT_VISIBLE bool recursiveSiblingUniqueNames(sdf::ElementPtr _elem)
Check that all sibling elements of the any type have unique names.
GZ_SDFORMAT_VISIBLE bool readFileWithoutConversion(const std::string &_filename, SDFPtr _sdf, Errors &_errors)
Populate the SDF values from a file without converting to the latest SDF version.
GZ_SDFORMAT_VISIBLE bool initFile(const std::string &_filename, SDFPtr _sdf)
Initialize the SDF interface using a file.
GZ_SDFORMAT_VISIBLE 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...
GZ_SDFORMAT_VISIBLE bool checkJointParentChildNames(const sdf::Root *_root)
Check that all joints in contained models specify parent and child link names that match the names of...
Root class that acts as an entry point to the SDF document model.
Definition: Root.hh:57
GZ_SDFORMAT_VISIBLE bool recursiveSiblingNoDoubleColonInNames(sdf::ElementPtr _elem)
Check that all sibling elements do not contain the delimiter double colons '::' in element names,...
GZ_SDFORMAT_VISIBLE bool readString(const std::string &_xmlString, SDFPtr _sdf, Errors &_errors)
Populate the SDF values from a string.
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:80
GZ_SDFORMAT_VISIBLE bool shouldValidateElement(sdf::ElementPtr _elem)
Check whether the element should be validated.
GZ_SDFORMAT_VISIBLE sdf::SDFPtr readFile(const std::string &_filename)
Populate the SDF values from a file.
GZ_SDFORMAT_VISIBLE 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...
static ParserConfig & GlobalConfig()
Mutable access to a singleton ParserConfig that serves as the global ParserConfig object for all pars...
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:55