9 #include "drake/drakeXMLUtil_export.h" 11 #include "drake/thirdParty/zlib/tinyxml2/tinyxml2.h" 13 template <
typename Scalar>
15 const char* strval = node->FirstChild()->Value();
17 std::stringstream s(strval);
24 template <
typename Scalar>
27 tinyxml2::XMLElement* elnode = node->FirstChildElement(element_name);
32 template <
typename Scalar>
34 const char* attribute_name, Scalar& val) {
35 const char* attr = node->Attribute(attribute_name);
37 std::stringstream s(attr);
77 Eigen::Vector3d* val);
98 const char* element_name, Eigen::Vector3d* val);
120 const char* attribute_name,
121 Eigen::Vector3d* val);
137 const char* attribute_name,
138 Eigen::Vector3d& val);
140 const char* attribute_name,
141 Eigen::Vector4d& val);
143 const char* element_name,
144 Eigen::Vector3d& val);
146 const char* element_name,
147 Eigen::Vector4d& val);
149 const char* element_name,
153 Eigen::Isometry3d& T);
156 tinyxml2::XMLElement* node,
const PoseMap& pose_map, Eigen::Isometry3d& T,
157 const Eigen::Isometry3d& T_default_frame = Eigen::Isometry3d::Identity());
179 DRAKEXMLUTIL_EXPORT std::string
resolveFilename(
const std::string& filename,
181 const std::string& root_dir);
DRAKEXMLUTIL_EXPORT void poseValueToTransform(tinyxml2::XMLElement *node, const PoseMap &pose_map, Eigen::Isometry3d &T, const Eigen::Isometry3d &T_default_frame=Eigen::Isometry3d::Identity())
Definition: xmlUtil.cpp:192
bool parseScalarAttribute(tinyxml2::XMLElement *node, const char *attribute_name, Scalar &val)
Definition: xmlUtil.h:33
DRAKEXMLUTIL_EXPORT void ParseThreeVectorAttribute(const tinyxml2::XMLElement *node, const char *attribute_name, Eigen::Vector3d *val)
Parses a three vector value from parameter node, which is an XML node.
Definition: xmlUtil.cpp:109
DRAKEXMLUTIL_EXPORT std::string resolveFilename(const std::string &filename, const PackageMap &package_map, const std::string &root_dir)
Resolves the fully-qualified name of a file.
DRAKEXMLUTIL_EXPORT void populatePackageMap(PackageMap &package_map)
DRAKEXMLUTIL_EXPORT double StringToDouble(const std::string &str)
Converts a string to a double value.
Definition: xmlUtil.cpp:67
std::map< std::string, std::string > PackageMap
Definition: xmlUtil.h:159
DRAKEXMLUTIL_EXPORT bool parseStringValue(tinyxml2::XMLElement *node, const char *element_name, std::string &val)
Definition: xmlUtil.cpp:172
DRAKEXMLUTIL_EXPORT void ParseThreeVectorValue(const char *strval, Eigen::Vector3d *val)
Parses a three vector value from parameter strval.
Definition: xmlUtil.cpp:16
DRAKEXMLUTIL_EXPORT bool parseVectorAttribute(const tinyxml2::XMLElement *node, const char *attribute_name, Eigen::Vector3d &val)
Definition: xmlUtil.cpp:128
DRAKEXMLUTIL_EXPORT void originAttributesToTransform(tinyxml2::XMLElement *node, Eigen::Isometry3d &T)
Definition: xmlUtil.cpp:182
std::map< std::string, Eigen::Isometry3d, std::less< std::string >, Eigen::aligned_allocator< std::pair< const std::string, Eigen::Isometry3d > > > PoseMap
Definition: pose_map.h:10
DRAKEXMLUTIL_EXPORT bool parseVectorValue(tinyxml2::XMLElement *node, const char *element_name, Eigen::Vector3d &val)
Definition: xmlUtil.cpp:150
bool parseScalarValue(tinyxml2::XMLElement *node, Scalar &val)
Definition: xmlUtil.h:14