AlignTrajectory.h
Go to the documentation of this file.
1 /*
2  * OpenVINS: An Open Platform for Visual-Inertial Research
3  * Copyright (C) 2018-2023 Patrick Geneva
4  * Copyright (C) 2018-2023 Guoquan Huang
5  * Copyright (C) 2018-2023 OpenVINS Contributors
6  * Copyright (C) 2018-2019 Kevin Eckenhoff
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef OV_EVAL_ALIGNTRAJECTORY_H
23 #define OV_EVAL_ALIGNTRAJECTORY_H
24 
25 #include <Eigen/Eigen>
26 #include <iostream>
27 #include <sstream>
28 #include <string>
29 #include <vector>
30 
31 #include "AlignUtils.h"
32 
33 #include "utils/colors.h"
34 #include "utils/print.h"
35 
36 namespace ov_eval {
37 
47 
48 public:
59  static void align_trajectory(const std::vector<Eigen::Matrix<double, 7, 1>> &traj_es,
60  const std::vector<Eigen::Matrix<double, 7, 1>> &traj_gt, Eigen::Matrix3d &R, Eigen::Vector3d &t, double &s,
61  std::string method, int n_aligned = -1);
62 
63 protected:
71  static void align_posyaw_single(const std::vector<Eigen::Matrix<double, 7, 1>> &traj_es,
72  const std::vector<Eigen::Matrix<double, 7, 1>> &traj_gt, Eigen::Matrix3d &R, Eigen::Vector3d &t);
73 
82  static void align_posyaw(const std::vector<Eigen::Matrix<double, 7, 1>> &traj_es, const std::vector<Eigen::Matrix<double, 7, 1>> &traj_gt,
83  Eigen::Matrix3d &R, Eigen::Vector3d &t, int n_aligned = -1);
84 
92  static void align_se3_single(const std::vector<Eigen::Matrix<double, 7, 1>> &traj_es,
93  const std::vector<Eigen::Matrix<double, 7, 1>> &traj_gt, Eigen::Matrix3d &R, Eigen::Vector3d &t);
94 
103  static void align_se3(const std::vector<Eigen::Matrix<double, 7, 1>> &traj_es, const std::vector<Eigen::Matrix<double, 7, 1>> &traj_gt,
104  Eigen::Matrix3d &R, Eigen::Vector3d &t, int n_aligned = -1);
105 
115  static void align_sim3(const std::vector<Eigen::Matrix<double, 7, 1>> &traj_es, const std::vector<Eigen::Matrix<double, 7, 1>> &traj_gt,
116  Eigen::Matrix3d &R, Eigen::Vector3d &t, double &s, int n_aligned = -1);
117 };
118 
119 } // namespace ov_eval
120 
121 #endif /* OV_EVAL_ALIGNTRAJECTORY_H */
static void align_posyaw(const std::vector< Eigen::Matrix< double, 7, 1 >> &traj_es, const std::vector< Eigen::Matrix< double, 7, 1 >> &traj_gt, Eigen::Matrix3d &R, Eigen::Vector3d &t, int n_aligned=-1)
Align estimate to GT using only position and yaw (for gravity aligned trajectories) using a set of in...
static void align_se3_single(const std::vector< Eigen::Matrix< double, 7, 1 >> &traj_es, const std::vector< Eigen::Matrix< double, 7, 1 >> &traj_gt, Eigen::Matrix3d &R, Eigen::Vector3d &t)
Align estimate to GT using a full SE(3) transform using only the first poses.
XmlRpcServer s
Evaluation and recording utilities.
static void align_trajectory(const std::vector< Eigen::Matrix< double, 7, 1 >> &traj_es, const std::vector< Eigen::Matrix< double, 7, 1 >> &traj_gt, Eigen::Matrix3d &R, Eigen::Vector3d &t, double &s, std::string method, int n_aligned=-1)
Align estimate to GT using a desired method using a set of initial poses.
static void align_se3(const std::vector< Eigen::Matrix< double, 7, 1 >> &traj_es, const std::vector< Eigen::Matrix< double, 7, 1 >> &traj_gt, Eigen::Matrix3d &R, Eigen::Vector3d &t, int n_aligned=-1)
Align estimate to GT using a full SE(3) transform using a set of initial poses.
static void align_sim3(const std::vector< Eigen::Matrix< double, 7, 1 >> &traj_es, const std::vector< Eigen::Matrix< double, 7, 1 >> &traj_gt, Eigen::Matrix3d &R, Eigen::Vector3d &t, double &s, int n_aligned=-1)
Align estimate to GT using a full SIM(3) transform using a set of initial poses.
static void align_posyaw_single(const std::vector< Eigen::Matrix< double, 7, 1 >> &traj_es, const std::vector< Eigen::Matrix< double, 7, 1 >> &traj_gt, Eigen::Matrix3d &R, Eigen::Vector3d &t)
Align estimate to GT using only position and yaw (for gravity aligned trajectories) using only the fi...
Class that given two trajectories, will align the two.


ov_eval
Author(s): Patrick Geneva , Kevin Eckenhoff , Guoquan Huang
autogenerated on Wed Jun 21 2023 03:05:39