TinyURDF 1.0.0
A Modern C++ Library for Parsing and Visualizing URDF Model Files
Loading...
Searching...
No Matches
utils.h
Go to the documentation of this file.
1#ifndef INCLUDE_TINYURDF_UTILS_H_
2#define INCLUDE_TINYURDF_UTILS_H_
3
4// Copyright 2025 Wissem CHIHA
5
6#include <stdexcept>
7#include <string>
8#include <vector>
9#include <sstream>
10
11#include <loguru/loguru.hpp>
12#include <Eigen/Dense>
13
14using Vec3 = Eigen::Matrix<double, 3, 1>;
15using Rot3 = Eigen::Quaternion<double>;
16
19void str2array(const char* str_, double* arr);
20
22void str2double(const char *in, double& num_);
23
25void split(const std::string& str, std::vector<std::string>& split_result,
26 const std::string& delimiter);
27
28#endif // INCLUDE_TINYURDF_UTILS_H_
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
Definition utils.h:14
void str2array(const char *str_, double *arr)
Definition utils.cc:3
void str2double(const char *in, double &num_)
a locale-safe version of string-to-double
Definition utils.cc:14
Eigen::Quaternion< double > Rot3
Definition utils.h:15