se2ez
|
Functions | |
const std::string | resolvePath (const std::string &path) |
Resolves file paths to their canonical form. More... | |
const std::string | loadFileToString (const std::string &path) |
Loads a file to a string. More... | |
const std::string | runCommand (const std::string &cmd) |
Runs a command cmd and returns stdout as a string. More... | |
const std::pair< bool, YAML::Node > | loadFileToYAML (const std::string &path) |
Loads a file to a YAML node. More... | |
void | createDirectory (const std::string &dir) |
Creates a directory. More... | |
void | createFile (std::ofstream &out, const std::string &file) |
Creates a file and opens an output stream. Creates directories if they do not exist. More... | |
const std::pair< bool, std::vector< std::string > > | listDirectory (const std::string &directory) |
Lists of the contents of a directory. More... | |
boost::posix_time::ptime | getDate () |
Get the current time (up to milliseconds) More... | |
std::vector< std::string > | tokenize (const std::string &string, const std::string &separators) |
Separates a string into tokens, based upon separators. More... | |
bool | YAMLToFile (const YAML::Node &node, const std::string &file) |
Write the contents of a YAML node out to a potentially new file. More... | |
void | sleep (double seconds) |
Have this thread sleep for some number of seconds. More... | |
bool | isNode (const YAML::Node &node) |
Returns true if node is a valid YAML node. More... | |
Eigen::VectorXd | toVector (const YAML::Node &node) |
Convert a sequence of doubles in YAML to an Eigen vector. More... | |
YAML::Node | toVector (const Eigen::Ref< const Eigen::VectorXd > &vec) |
Convert a sequence of doubles in an Eigen vector to YAML. More... | |
template<typename... Args> | |
void | throwParsingError (const YAML::Node &node, const std::string &fmt, Args &&... args) |
Convenience function to print out a YAML error message with line and column information. More... | |
RobotPtr | loadRobot (const std::string &filename) |
Loads a robot from a YAML file. More... | |
bool | loadStates (RobotPtr robot, const std::string &filename) |
Loads named robot states from a YAML file. More... | |
void se2ez::io::createDirectory | ( | const std::string & | dir | ) |
void se2ez::io::createFile | ( | std::ofstream & | out, |
const std::string & | file | ||
) |
boost::posix_time::ptime se2ez::io::getDate | ( | ) |
bool se2ez::io::isNode | ( | const YAML::Node & | node | ) |
const std::pair< bool, std::vector< std::string > > se2ez::io::listDirectory | ( | const std::string & | directory | ) |
Lists of the contents of a directory.
[in] | directory | Directory to list. |
const std::string se2ez::io::loadFileToString | ( | const std::string & | path | ) |
const std::pair< bool, YAML::Node > se2ez::io::loadFileToYAML | ( | const std::string & | path | ) |
RobotPtr se2ez::io::loadRobot | ( | const std::string & | filename | ) |
bool se2ez::io::loadStates | ( | RobotPtr | robot, |
const std::string & | filename | ||
) |
const std::string se2ez::io::resolvePath | ( | const std::string & | path | ) |
const std::string se2ez::io::runCommand | ( | const std::string & | cmd | ) |
void se2ez::io::sleep | ( | double | seconds | ) |
void se2ez::io::throwParsingError | ( | const YAML::Node & | node, |
const std::string & | fmt, | ||
Args &&... | args | ||
) |
Convenience function to print out a YAML error message with line and column information.
[in] | node | Node that was culprit. |
[in] | fmt | Format string for error message. |
[in] | args | Arguments to format string. |
Args | Variadic arguments for format string. |
std::runtime_error | always. |
std::vector< std::string > se2ez::io::tokenize | ( | const std::string & | string, |
const std::string & | separators | ||
) |
Eigen::VectorXd se2ez::io::toVector | ( | const YAML::Node & | node | ) |
YAML::Node se2ez::io::toVector | ( | const Eigen::Ref< const Eigen::VectorXd > & | vec | ) |
bool se2ez::io::YAMLToFile | ( | const YAML::Node & | node, |
const std::string & | file | ||
) |