39 localTransform_(localTransform),
60 UERROR(
"no imu file found at %s",path.c_str());
63 int number_of_lines = 0;
66 printf(
"No. IMU measurements: %d\n", number_of_lines-1);
67 if (number_of_lines - 1 <= 0) {
68 UERROR(
"no imu messages present in %s", path.c_str());
118 std::stringstream stream(line);
120 std::getline(stream, s,
',');
121 std::string nanoseconds = s.substr(s.size() - 9, 9);
122 std::string seconds = s.substr(0, s.size() - 9);
125 for (
int j = 0; j < 3; ++j) {
126 std::getline(stream, s,
',');
131 for (
int j = 0; j < 3; ++j) {
132 std::getline(stream, s,
',');
148 UWARN(
"no more imu data...");
int UTILITE_EXP uStr2Int(const std::string &str)
bool init(const std::string &path)
double UTILITE_EXP uStr2Double(const std::string &str)
GLM_FUNC_DECL genType e()
Some conversion functions.
void post(UEvent *event, bool async=true) const
static void registerCurrentThread(const std::string &name)
virtual void mainLoopBegin()
void uSleep(unsigned int ms)
ULogger class and convenient macros.
IMUThread(int rate, const Transform &localTransform)
Transform localTransform_