ov_eval::Loader class

Has helper functions to load text files from disk and process them.

Contents

Public static functions

static void load_data(std::string path_traj, std::vector<double>& times, std::vector<Eigen::Matrix<double, 7, 1>>& poses, std::vector<Eigen::Matrix3d>& cov_ori, std::vector<Eigen::Matrix3d>& cov_pos)
This will load space separated trajectory into memory.
static void load_simulation(std::string path, std::vector<Eigen::VectorXd>& values)
Load an arbitrary sized row of space separated values, used for our simulation.
static void load_timing_flamegraph(std::string path, std::vector<std::string>& names, std::vector<double>& times, std::vector<Eigen::VectorXd>& timing_values)
Load comma separated timing file from pid_ros.py file.
static void load_timing_percent(std::string path, std::vector<double>& times, std::vector<Eigen::Vector3d>& summed_values, std::vector<Eigen::VectorXd>& node_values)
Load space separated timing file from pid_ros.py file.
static auto get_total_length(const std::vector<Eigen::Matrix<double, 7, 1>>& poses) -> double
Will calculate the total trajectory distance.

Function documentation

static void ov_eval::Loader::load_data(std::string path_traj, std::vector<double>& times, std::vector<Eigen::Matrix<double, 7, 1>>& poses, std::vector<Eigen::Matrix3d>& cov_ori, std::vector<Eigen::Matrix3d>& cov_pos)

This will load space separated trajectory into memory.

Parameters
path_traj Path to the trajectory file that we want to read in.
times Timesteps in seconds for each pose
poses Pose at every timestep [pos,quat]
cov_ori Vector of orientation covariances at each timestep (empty if we can't load)
cov_pos Vector of position covariances at each timestep (empty if we can't load)

static void ov_eval::Loader::load_simulation(std::string path, std::vector<Eigen::VectorXd>& values)

Load an arbitrary sized row of space separated values, used for our simulation.

Parameters
path Path to our text file to load
values Each row of values

static void ov_eval::Loader::load_timing_flamegraph(std::string path, std::vector<std::string>& names, std::vector<double>& times, std::vector<Eigen::VectorXd>& timing_values)

Load comma separated timing file from pid_ros.py file.

Parameters
path Path to our text file to load
names Names of each timing category
times Timesteps in seconds for each measurement
timing_values Component timing values for the given timestamp

static void ov_eval::Loader::load_timing_percent(std::string path, std::vector<double>& times, std::vector<Eigen::Vector3d>& summed_values, std::vector<Eigen::VectorXd>& node_values)

Load space separated timing file from pid_ros.py file.

Parameters
path Path to our text file to load
times Timesteps in seconds for each measurement
summed_values Summed node values [cpu,mem,num_threads]
node_values Values for each separate node [cpu,mem,num_threads]

static double ov_eval::Loader::get_total_length(const std::vector<Eigen::Matrix<double, 7, 1>>& poses)

Will calculate the total trajectory distance.

Parameters
poses Pose at every timestep [pos,quat]
Returns Distance travels (meters)