Static Public Member Functions | List of all members
ov_eval::AlignUtils Class Reference

Helper functions for the trajectory alignment class. More...

#include <AlignUtils.h>

Static Public Member Functions

static void align_umeyama (const std::vector< Eigen::Matrix< double, 3, 1 >> &data, const std::vector< Eigen::Matrix< double, 3, 1 >> &model, Eigen::Matrix< double, 3, 3 > &R, Eigen::Matrix< double, 3, 1 > &t, double &s, bool known_scale, bool yaw_only)
 Given a set of points in a model frame and a set of points in a data frame, finds best transform between frames (subject to constraints). More...
 
static double get_best_yaw (const Eigen::Matrix< double, 3, 3 > &C)
 Gets best yaw from Frobenius problem. Equation (17)-(18) in Zhang et al. 2018 IROS paper. More...
 
static Eigen::Matrix< double, 3, 1 > get_mean (const std::vector< Eigen::Matrix< double, 3, 1 >> &data)
 Gets mean of the vector of data. More...
 
static void perform_association (double offset, double max_difference, std::vector< double > &est_times, std::vector< double > &gt_times, std::vector< Eigen::Matrix< double, 7, 1 >> &est_poses, std::vector< Eigen::Matrix< double, 7, 1 >> &gt_poses)
 Will intersect our loaded data so that we have common timestamps. More...
 
static void perform_association (double offset, double max_difference, std::vector< double > &est_times, std::vector< double > &gt_times, std::vector< Eigen::Matrix< double, 7, 1 >> &est_poses, std::vector< Eigen::Matrix< double, 7, 1 >> &gt_poses, std::vector< Eigen::Matrix3d > &est_covori, std::vector< Eigen::Matrix3d > &est_covpos, std::vector< Eigen::Matrix3d > &gt_covori, std::vector< Eigen::Matrix3d > &gt_covpos)
 Will intersect our loaded data so that we have common timestamps. More...
 

Detailed Description

Helper functions for the trajectory alignment class.

The key function is an implementation of Umeyama's Least-squares estimation of transformation parameters between two point patterns. This is what allows us to find the transform between the two trajectories without worrying about singularities for the absolute trajectory error.

Definition at line 45 of file AlignUtils.h.

Member Function Documentation

◆ align_umeyama()

void AlignUtils::align_umeyama ( const std::vector< Eigen::Matrix< double, 3, 1 >> &  data,
const std::vector< Eigen::Matrix< double, 3, 1 >> &  model,
Eigen::Matrix< double, 3, 3 > &  R,
Eigen::Matrix< double, 3, 1 > &  t,
double &  s,
bool  known_scale,
bool  yaw_only 
)
static

Given a set of points in a model frame and a set of points in a data frame, finds best transform between frames (subject to constraints).

Parameters
dataVector of points in data frame (i.e., estimates)
modelVector of points in model frame (i.e., gt)
ROutput rotation from data frame to model frame
tOutput translation from data frame to model frame
sOutput scale from data frame to model frame
known_scaleWhether to fix scale
yaw_onlyWhether to only use yaw orientation (such as when frames are already gravity aligned)

Definition at line 26 of file AlignUtils.cpp.

◆ get_best_yaw()

static double ov_eval::AlignUtils::get_best_yaw ( const Eigen::Matrix< double, 3, 3 > &  C)
inlinestatic

Gets best yaw from Frobenius problem. Equation (17)-(18) in Zhang et al. 2018 IROS paper.

Parameters
CData matrix

Definition at line 53 of file AlignUtils.h.

◆ get_mean()

static Eigen::Matrix<double, 3, 1> ov_eval::AlignUtils::get_mean ( const std::vector< Eigen::Matrix< double, 3, 1 >> &  data)
inlinestatic

Gets mean of the vector of data.

Parameters
dataVector of data
Returns
Mean value

Definition at line 65 of file AlignUtils.h.

◆ perform_association() [1/2]

void AlignUtils::perform_association ( double  offset,
double  max_difference,
std::vector< double > &  est_times,
std::vector< double > &  gt_times,
std::vector< Eigen::Matrix< double, 7, 1 >> &  est_poses,
std::vector< Eigen::Matrix< double, 7, 1 >> &  gt_poses 
)
static

Will intersect our loaded data so that we have common timestamps.

Parameters
offsetTime offset to append to our estimate
max_differenceBiggest allowed difference between matched timesteps

Definition at line 95 of file AlignUtils.cpp.

◆ perform_association() [2/2]

void AlignUtils::perform_association ( double  offset,
double  max_difference,
std::vector< double > &  est_times,
std::vector< double > &  gt_times,
std::vector< Eigen::Matrix< double, 7, 1 >> &  est_poses,
std::vector< Eigen::Matrix< double, 7, 1 >> &  gt_poses,
std::vector< Eigen::Matrix3d > &  est_covori,
std::vector< Eigen::Matrix3d > &  est_covpos,
std::vector< Eigen::Matrix3d > &  gt_covori,
std::vector< Eigen::Matrix3d > &  gt_covpos 
)
static

Will intersect our loaded data so that we have common timestamps.

Parameters
offsetTime offset to append to our estimate
max_differenceBiggest allowed difference between matched timesteps

Definition at line 103 of file AlignUtils.cpp.


The documentation for this class was generated from the following files:


ov_eval
Author(s): Patrick Geneva , Kevin Eckenhoff , Guoquan Huang
autogenerated on Mon Dec 16 2024 03:06:50