8#include <RobotsIO/Utils/DatasetTransform.h>
11using namespace RobotsIO::Utils;
14DatasetTransform::DatasetTransform
16 const std::string& file_path,
17 const std::size_t& skip_rows,
18 const std::size_t& skip_cols,
19 const std::size_t& expected_cols,
20 const int rx_time_index,
21 const int tx_time_index
23 DatasetDataStream(file_path, skip_rows, skip_cols, expected_cols, rx_time_index, tx_time_index)
27DatasetTransform::~DatasetTransform()
31Eigen::Transform<double, 3, Eigen::Affine> DatasetTransform::transform()
37bool DatasetTransform::freeze(
const bool blocking)
39 if (!DatasetDataStream::freeze())
42 VectorXd transform_data = data();
44 bool invalid_pose =
true;
45 for (std::size_t i = 0; i < transform_data.size(); i++)
46 invalid_pose &= (transform_data(i) == 0.0);
50 transform_ = Translation<double, 3>(transform_data.head<3>());
51 AngleAxisd rotation(transform_data(6), transform_data.segment<3>(3));
52 transform_.rotate(rotation);