58#include <core/exceptions/system.h>
59#include <kdl_parser/exceptions.h>
60#include <urdf_parser/urdf_parser.h>
71IsColladaData(
const std::string &data)
73 return data.find(
"<COLLADA") != std::string::npos;
92 std::string xml_string;
93 std::fstream xml_file(filename.c_str(), std::fstream::in);
94 if (xml_file.is_open()) {
95 while (xml_file.good()) {
97 std::getline(xml_file, line);
98 xml_string += (line +
"\n");
118 std::stringstream ss;
135 std::stringstream ss;
148 ModelInterfaceSharedPtr model;
150 if (IsColladaData(xml_string)) {
154 model = parseURDF(xml_string);
159 this->links_ = model->links_;
160 this->joints_ = model->joints_;
161 this->materials_ = model->materials_;
162 this->name_ = model->name_;
163 this->root_link_ = model->root_link_;
File could not be opened.
Tried to to parse Collada data which is not supported.
Failed to parse XML Document.
Failed to parse XML Element.
bool initFile(const std::string &filename)
Initialize the Model using a URDF file.
bool initString(const std::string &xmlstring)
Initialize the model using an URDF string.
bool initXml(TiXmlElement *xml)
Initialize the model using a XML Element.
Fawkes library namespace.