Helper functions for the trajectory alignment class.
More...
#include <AlignUtils.h>
|
| 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 > >_times, std::vector< Eigen::Matrix< double, 7, 1 >> &est_poses, std::vector< Eigen::Matrix< double, 7, 1 >> >_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 > >_times, std::vector< Eigen::Matrix< double, 7, 1 >> &est_poses, std::vector< Eigen::Matrix< double, 7, 1 >> >_poses, std::vector< Eigen::Matrix3d > &est_covori, std::vector< Eigen::Matrix3d > &est_covpos, std::vector< Eigen::Matrix3d > >_covori, std::vector< Eigen::Matrix3d > >_covpos) |
| | Will intersect our loaded data so that we have common timestamps. More...
|
| |
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.
◆ 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
-
| data | Vector of points in data frame (i.e., estimates) |
| model | Vector of points in model frame (i.e., gt) |
| R | Output rotation from data frame to model frame |
| t | Output translation from data frame to model frame |
| s | Output scale from data frame to model frame |
| known_scale | Whether to fix scale |
| yaw_only | Whether 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 |
◆ 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
-
- 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
-
| offset | Time offset to append to our estimate |
| max_difference | Biggest 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
-
| offset | Time offset to append to our estimate |
| max_difference | Biggest allowed difference between matched timesteps |
Definition at line 103 of file AlignUtils.cpp.
The documentation for this class was generated from the following files: