UpdaterHelper.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_MSCKF_UPDATER_HELPER_H
23 #define OV_MSCKF_UPDATER_HELPER_H
24 
25 #include <Eigen/Eigen>
26 #include <memory>
27 #include <unordered_map>
28 
30 
31 namespace ov_type {
32 class Type;
33 } // namespace ov_type
34 
35 namespace ov_msckf {
36 
37 class State;
38 
50 public:
55 
57  size_t featid;
58 
60  std::unordered_map<size_t, std::vector<Eigen::VectorXf>> uvs;
61 
62  // UV normalized coordinates that this feature has been seen from (mapped by camera ID)
63  std::unordered_map<size_t, std::vector<Eigen::VectorXf>> uvs_norm;
64 
66  std::unordered_map<size_t, std::vector<double>> timestamps;
67 
70 
72  int anchor_cam_id = -1;
73 
75  double anchor_clone_timestamp = -1;
76 
78  Eigen::Vector3d p_FinA;
79 
81  Eigen::Vector3d p_FinA_fej;
82 
84  Eigen::Vector3d p_FinG;
85 
87  Eigen::Vector3d p_FinG_fej;
88  };
89 
99  static void get_feature_jacobian_representation(std::shared_ptr<State> state, UpdaterHelperFeature &feature, Eigen::MatrixXd &H_f,
100  std::vector<Eigen::MatrixXd> &H_x, std::vector<std::shared_ptr<ov_type::Type>> &x_order);
101 
112  static void get_feature_jacobian_full(std::shared_ptr<State> state, UpdaterHelperFeature &feature, Eigen::MatrixXd &H_f,
113  Eigen::MatrixXd &H_x, Eigen::VectorXd &res, std::vector<std::shared_ptr<ov_type::Type>> &x_order);
114 
126  static void nullspace_project_inplace(Eigen::MatrixXd &H_f, Eigen::MatrixXd &H_x, Eigen::VectorXd &res);
127 
137  static void measurement_compress_inplace(Eigen::MatrixXd &H_x, Eigen::VectorXd &res);
138 };
139 
140 } // namespace ov_msckf
141 
142 #endif // OV_MSCKF_UPDATER_HELPER_H
Class that has helper functions for our updaters.
Definition: UpdaterHelper.h:49
Extended Kalman Filter estimator.
Definition: VioManager.h:46
size_t featid
Unique ID of this feature.
Definition: UpdaterHelper.h:57
Eigen::Vector3d p_FinA
Triangulated position of this feature, in the anchor frame.
Definition: UpdaterHelper.h:78
ov_type::LandmarkRepresentation::Representation feat_representation
What representation our feature is in.
Definition: UpdaterHelper.h:69
Eigen::Vector3d p_FinA_fej
Triangulated position of this feature, in the anchor frame first estimate.
Definition: UpdaterHelper.h:81
Eigen::Vector3d p_FinG_fej
Triangulated position of this feature, in the global frame first estimate.
Definition: UpdaterHelper.h:87
Feature object that our UpdaterHelper leverages, has all measurements and means.
Definition: UpdaterHelper.h:54
std::unordered_map< size_t, std::vector< Eigen::VectorXf > > uvs
UV coordinates that this feature has been seen from (mapped by camera ID)
Definition: UpdaterHelper.h:60
std::unordered_map< size_t, std::vector< double > > timestamps
Timestamps of each UV measurement (mapped by camera ID)
Definition: UpdaterHelper.h:66
std::unordered_map< size_t, std::vector< Eigen::VectorXf > > uvs_norm
Definition: UpdaterHelper.h:63
Eigen::Vector3d p_FinG
Triangulated position of this feature, in the global frame.
Definition: UpdaterHelper.h:84


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