8#include <RobotsIO/Utils/DatasetDataStreamDelayed.h>
11using namespace RobotsIO::Utils;
14DatasetDataStreamDelayed::DatasetDataStreamDelayed
17 const double& simulated_fps,
18 const bool simulate_inference_time,
19 const std::string& file_path,
20 const std::size_t& skip_rows,
21 const std::size_t& skip_cols,
22 const std::size_t& expected_cols,
23 const int rx_time_index,
24 const int tx_time_index
26 DatasetDataStream(file_path, skip_rows, skip_cols, expected_cols, rx_time_index, tx_time_index),
27 delay_(static_cast<int>(fps / simulated_fps)),
28 simulate_inference_time_(simulate_inference_time)
30 if (simulate_inference_time_)
31 set_head(get_head() - delay_ + skip_rows);
35DatasetDataStreamDelayed::~DatasetDataStreamDelayed()
39VectorXd DatasetDataStreamDelayed::data()
41 int head = get_head();
43 if (simulate_inference_time_)
49 return DatasetDataStream::data(head);
53bool DatasetDataStreamDelayed::freeze()
55 DatasetDataStream::freeze();
57 if ((get_head() % delay_) != 0)