|
template<typename Scalar > |
bool | parseScalarValue (tinyxml2::XMLElement *node, Scalar &val) |
|
template<typename Scalar > |
bool | parseScalarValue (tinyxml2::XMLElement *node, const char *element_name, Scalar &val) |
|
template<typename Scalar > |
bool | parseScalarAttribute (tinyxml2::XMLElement *node, const char *attribute_name, Scalar &val) |
|
DRAKEXMLUTIL_EXPORT void | ParseThreeVectorValue (const char *strval, Eigen::Vector3d *val) |
| Parses a three vector value from parameter strval . More...
|
|
DRAKEXMLUTIL_EXPORT void | ParseThreeVectorValue (const tinyxml2::XMLElement *node, Eigen::Vector3d *val) |
| Parses a three vector value from parameter node , which is an XML node. More...
|
|
DRAKEXMLUTIL_EXPORT void | ParseThreeVectorValue (const tinyxml2::XMLElement *node, const char *element_name, Eigen::Vector3d *val) |
| Parses a three vector value from parameter node , which is an XML node. More...
|
|
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. More...
|
|
DRAKEXMLUTIL_EXPORT double | StringToDouble (const std::string &str) |
| Converts a string to a double value. More...
|
|
DRAKEXMLUTIL_EXPORT bool | parseVectorAttribute (const tinyxml2::XMLElement *node, const char *attribute_name, Eigen::Vector3d &val) |
|
DRAKEXMLUTIL_EXPORT bool | parseVectorAttribute (const tinyxml2::XMLElement *node, const char *attribute_name, Eigen::Vector4d &val) |
|
DRAKEXMLUTIL_EXPORT bool | parseVectorValue (tinyxml2::XMLElement *node, const char *element_name, Eigen::Vector3d &val) |
|
DRAKEXMLUTIL_EXPORT bool | parseVectorValue (tinyxml2::XMLElement *node, const char *element_name, Eigen::Vector4d &val) |
|
DRAKEXMLUTIL_EXPORT bool | parseStringValue (tinyxml2::XMLElement *node, const char *element_name, std::string &val) |
|
DRAKEXMLUTIL_EXPORT void | originAttributesToTransform (tinyxml2::XMLElement *node, Eigen::Isometry3d &T) |
|
DRAKEXMLUTIL_EXPORT void | poseValueToTransform (tinyxml2::XMLElement *node, const PoseMap &pose_map, Eigen::Isometry3d &T, const Eigen::Isometry3d &T_default_frame=Eigen::Isometry3d::Identity()) |
|
DRAKEXMLUTIL_EXPORT void | populatePackageMap (PackageMap &package_map) |
|
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. More...
|
|
DRAKEXMLUTIL_EXPORT void ParseThreeVectorValue |
( |
const char * |
strval, |
|
|
Eigen::Vector3d * |
val |
|
) |
| |
Parses a three vector value from parameter strval
.
There are two formats of strval
that can be successfully parsed. The first format is "val1 val2 val3" where val1, val2, and val3 are double values. The second valid format is "val" where val is a double type. In this case, this method automatically converts the val1 scalar value into a three vector by using the same scalar value for all three dimensions.
- Parameters
-
[in] | strval | A pointer to the character array describing a three vector or a scalar value. |
[out] | val | The three vector into which the results should be stored. |
- Returns
- Whether the three vector was successfully parsed from
strval
.
- Exceptions
-
std::invalid_argument | If any problem is encountered parsing the three vector value. |
DRAKEXMLUTIL_EXPORT void ParseThreeVectorValue |
( |
const tinyxml2::XMLElement * |
node, |
|
|
const char * |
element_name, |
|
|
Eigen::Vector3d * |
val |
|
) |
| |
Parses a three vector value from parameter node
, which is an XML node.
The value is contained in an element within node
, as specified by parameter element_name
. This method also supports a three vector specified by a single scalar value, which it automatically converts into a three vector by using the same scalar value for all three dimensions.
- Parameters
-
[in] | node | A pointer to the XML element node that contains either a three vector or a scalar value. |
[in] | element_name | The name of the child XML element containing the scale three vector or scalar value. |
[out] | val | The three vector where the results should be stored. |
- Returns
- Whether the three vector was successfully parsed from the XML element node.
- Exceptions
-
std::invalid_argument | If any problem is encountered parsing the three vector value. |
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.
If filename
starts with "package:", the ROS packages specified in package_map
are searched. Otherwise, filename
is appended to the end of root_dir
and checked for existence. If the file does not exist or is not found, a warning is printed to std::cerr
and an empty string is returned.
- Parameters
-
[in] | filename | The name of the file to find. |
[in] | package_map | A map where the keys are ROS package names and the values are the paths to the packages. This is only used if filename starts with "package:". |
[in] | root_dir | The root directory to look in. This is only used when assuming filename does not start with "package:". |
- Returns
- The file's fully-qualified name or an empty string if the file is not found or does not exist.