RobotsIO
Loading...
Searching...
No Matches
DatasetSpatialVelocity.h
1/*
2 * Copyright (C) 2020 Istituto Italiano di Tecnologia (IIT)
3 *
4 * This software may be modified and distributed under the terms of the
5 * BSD 3-Clause license. See the accompanying LICENSE file for details.
6 */
7
8#ifndef ROBOTSIO_DATASETSPATIALVELOCITY_H
9#define ROBOTSIO_DATASETSPATIALVELOCITY_H
10
11#include <Eigen/Dense>
12
13#include <RobotsIO/Utils/DatasetDataStream.h>
14#include <RobotsIO/Utils/SpatialVelocity.h>
15
16namespace RobotsIO {
17 namespace Utils {
18 class DatasetSpatialVelocity;
19 }
20}
21
22
25{
26public:
27 DatasetSpatialVelocity(const std::string& file_path, const std::size_t& skip_rows, const std::size_t& skip_cols, const std::size_t& expected_cols, const int rx_time_index = RobotsIO::Utils::DatasetDataStream::NoTimeIndex, const int tx_time_index = RobotsIO::Utils::DatasetDataStream::NoTimeIndex);
28
30
31 bool freeze(const bool blocking = false) override;
32
33 double elapsed_time() override;
34
35protected:
36 Eigen::VectorXd twist() override;
37
38private:
39 double last_time_;
40
41 double elapsed_time_;
42
43 bool last_time_initialized_ = false;
44
45 Eigen::VectorXd twist_;
46
47 const std::string log_name_ = "DatasetSpatialVelocity";
48};
49
50#endif /* ROBOTSIO_DATASETSPATIALVELOCITY_H */