Function ouster::sdk::mapping::save_trajectory
Defined in File pose_optimizer.h
Function Documentation
-
void ouster::sdk::mapping::save_trajectory(const std::string &filename, const std::vector<uint64_t> ×tamps, const std::vector<Eigen::Matrix<double, 4, 4>> &poses, const std::string &file_type = "csv")
Saves a trajectory into a file.
This function exports the given sequence of timestamps and corresponding 4×4 pose matrices to an output file. Supported output formats are:
”csv”: comma-separated values with columns timestamp, tx, ty, tz, qx, qy, qz, qw
”tum”: TUM trajectory format: timestamp tx ty tz qx qy qz qw
- Parameters:
filename[in] – Path of the file to write.
timestamps[in] – A vector of uint64_t timestamps, one per pose.
poses[in] – A vector of 4×4 Eigen homogeneous transforms matrix, each representing the pose at the matching timestamp.
file_type[in] – Output format selector: “csv” or “tum” (default = “csv”).
- Throws:
std::runtime_error – on I/O error or unsupported file type.