ov_core::DatasetReader class

Helper functions to read in dataset files.

Contents

This file has some nice functions for reading dataset files. One of the main datasets that we test against is the EuRoC MAV dataset. We have some nice utility functions here that handle loading of the groundtruth data. This can be used to initialize the system or for plotting and calculation of RMSE values without needing any alignment.

M. Burri, J. Nikolic, P. Gohl, T. Schneider, J. Rehder, S. Omari,M. Achtelik and R. Siegwart, "The EuRoC micro aerial vehicle datasets", International Journal of Robotic Research, DOI: 10.1177/0278364915620033, 2016. https://projects.asl.ethz.ch/datasets/doku.php?id=kmavvisualinertialdatasets.

Public static functions

static void load_gt_file(std::string path, std::map<double, Eigen::Matrix<double, 17, 1>>& gt_states)
Load a ASL format groundtruth file.
static auto get_gt_state(double timestep, Eigen::Matrix<double, 17, 1>& imustate, std::map<double, Eigen::Matrix<double, 17, 1>>& gt_states) -> bool
Gets the 17x1 groundtruth state at a given timestep.

Function documentation

static void ov_core::DatasetReader::load_gt_file(std::string path, std::map<double, Eigen::Matrix<double, 17, 1>>& gt_states)

Load a ASL format groundtruth file.

Parameters
path Path to the CSV file of groundtruth data
gt_states Will be filled with groundtruth states

Here we will try to load a groundtruth file that is in the ASL/EUROCMAV format. If we can't open the file, or it is in the wrong format we will error and exit the program. See get_gt_state() for a way to get the groundtruth state at a given timestep

static bool ov_core::DatasetReader::get_gt_state(double timestep, Eigen::Matrix<double, 17, 1>& imustate, std::map<double, Eigen::Matrix<double, 17, 1>>& gt_states)

Gets the 17x1 groundtruth state at a given timestep.

Parameters
timestep timestep we want to get the groundtruth for
imustate groundtruth state [time(sec),q_GtoI,p_IinG,v_IinG,b_gyro,b_accel]
gt_states Should be loaded with groundtruth states, see load_gt_file() for details
Returns true if we found the state, false otherwise