22 #ifndef OV_EVAL_ALIGNUTILS_H
23 #define OV_EVAL_ALIGNUTILS_H
25 #include <Eigen/Eigen>
53 static inline double get_best_yaw(
const Eigen::Matrix<double, 3, 3> &C) {
54 double A = C(0, 1) - C(1, 0);
55 double B = C(0, 0) + C(1, 1);
65 static inline Eigen::Matrix<double, 3, 1>
get_mean(
const std::vector<Eigen::Matrix<double, 3, 1>> &data) {
66 Eigen::Matrix<double, 3, 1> mean = Eigen::Matrix<double, 3, 1>::Zero();
67 for (
size_t i = 0; i < data.size(); i++) {
68 mean.noalias() += data[i];
86 static void align_umeyama(
const std::vector<Eigen::Matrix<double, 3, 1>> &data,
const std::vector<Eigen::Matrix<double, 3, 1>> &model,
87 Eigen::Matrix<double, 3, 3> &R, Eigen::Matrix<double, 3, 1> &t,
double &s,
bool known_scale,
bool yaw_only);
94 static void perform_association(
double offset,
double max_difference, std::vector<double> &est_times, std::vector<double> >_times,
95 std::vector<Eigen::Matrix<double, 7, 1>> &est_poses, std::vector<Eigen::Matrix<double, 7, 1>> >_poses);
102 static void perform_association(
double offset,
double max_difference, std::vector<double> &est_times, std::vector<double> >_times,
103 std::vector<Eigen::Matrix<double, 7, 1>> &est_poses, std::vector<Eigen::Matrix<double, 7, 1>> >_poses,
104 std::vector<Eigen::Matrix3d> &est_covori, std::vector<Eigen::Matrix3d> &est_covpos,
105 std::vector<Eigen::Matrix3d> >_covori, std::vector<Eigen::Matrix3d> >_covpos);
110 #endif // OV_EVAL_ALIGNUTILS_H