| 28 | namespace fs = std::filesystem; |
| 29 | |
| 30 | std::vector<double> LoadCameraTimestamps(const std::string& filepath) { |
| 31 | std::vector<double> timestamps; |
| 32 | std::ifstream file(filepath); |
| 33 | |
| 34 | if (!file.is_open()) { |
| 35 | LOG_ERROR("Failed to open {}", filepath); |
| 36 | return timestamps; |
| 37 | } |
| 38 | |
| 39 | std::string line; |
| 40 | while (std::getline(file, line)) { |
| 41 | if (line.empty()) continue; |
| 42 | try { |
| 43 | timestamps.push_back(std::stod(line)); |
| 44 | } catch (...) {} |
| 45 | } |
| 46 | |
| 47 | return timestamps; |
| 48 | } |
| 49 | |
| 50 | std::vector<vio_360::IMUData> LoadIMUData(const std::string& filepath) { |
| 51 | std::vector<vio_360::IMUData> imu_data; |