1#ifndef INCLUDE_TINYURDF_UTILITY_UTILS_H_
2#define INCLUDE_TINYURDF_UTILITY_UTILS_H_
10#include <loguru/loguru.hpp>
17using Vec3 = Eigen::Matrix<double, 3, 1>;
22using Rot3 = Eigen::Quaternion<double>;
30void str2array(
const char* str_,
double* arr);
43void split(
const std::string& str, std::vector<std::string>& split_result,
44 const std::string& delimiter);
51std::string
join(
const std::vector<std::string>& elements,
const std::string& delimiter);
56std::string
trim(
const std::string& str);
61std::string
toLower(
const std::string& str);
66std::string
toUpper(
const std::string& str);
std::string toUpper(const std::string &str)
Converts a string to uppercase.
void split(const std::string &str, std::vector< std::string > &split_result, const std::string &delimiter)
Splits a string by a delimiter into a vector of strings.
Definition utils.cc:22
Eigen::Matrix< double, 3, 1 > Vec3
Base struct for 3D position vectors.
Definition utils.h:17
void str2array(const char *str_, double *arr)
Definition utils.cc:3
std::string trim(const std::string &str)
Trims leading and trailing whitespace from a string.
std::string toLower(const std::string &str)
Converts a string to lowercase.
std::string join(const std::vector< std::string > &elements, const std::string &delimiter)
Joins a vector of strings into a single string with a given delimiter.
void str2double(const char *in, double &num_)
Converts a string to a double value in a locale-safe manner.
Definition utils.cc:14
Eigen::Quaternion< double > Rot3
Base struct for 3D rotation elements.
Definition utils.h:22