StaticInitializer.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_INIT_STATICINITIALIZER_H
23 #define OV_INIT_STATICINITIALIZER_H
24 
26 
27 namespace ov_core {
28 class FeatureDatabase;
29 struct ImuData;
30 } // namespace ov_core
31 namespace ov_type {
32 class Type;
33 class IMU;
34 } // namespace ov_type
35 
36 namespace ov_init {
37 
51 
52 public:
59  explicit StaticInitializer(InertialInitializerOptions &params_, std::shared_ptr<ov_core::FeatureDatabase> db,
60  std::shared_ptr<std::vector<ov_core::ImuData>> imu_data_)
61  : params(params_), _db(db), imu_data(imu_data_) {}
62 
81  bool initialize(double &timestamp, Eigen::MatrixXd &covariance, std::vector<std::shared_ptr<ov_type::Type>> &order,
82  std::shared_ptr<ov_type::IMU> t_imu, bool wait_for_jerk = true);
83 
84 private:
87 
89  std::shared_ptr<ov_core::FeatureDatabase> _db;
90 
92  std::shared_ptr<std::vector<ov_core::ImuData>> imu_data;
93 };
94 
95 } // namespace ov_init
96 
97 #endif // OV_INIT_STATICINITIALIZER_H
ov_init::StaticInitializer::params
InertialInitializerOptions params
Initialization parameters.
Definition: StaticInitializer.h:86
ov_init::InertialInitializerOptions
Struct which stores all options needed for state estimation.
Definition: InertialInitializerOptions.h:49
ov_init::StaticInitializer::initialize
bool initialize(double &timestamp, Eigen::MatrixXd &covariance, std::vector< std::shared_ptr< ov_type::Type >> &order, std::shared_ptr< ov_type::IMU > t_imu, bool wait_for_jerk=true)
Try to get the initialized system using just the imu.
Definition: StaticInitializer.cpp:37
ov_init::StaticInitializer::_db
std::shared_ptr< ov_core::FeatureDatabase > _db
Feature tracker database with all features in it.
Definition: StaticInitializer.h:89
ov_init
State initialization code.
Definition: Factor_GenericPrior.h:27
ov_init::StaticInitializer
Initializer for a static visual-inertial system.
Definition: StaticInitializer.h:50
ov_init::StaticInitializer::imu_data
std::shared_ptr< std::vector< ov_core::ImuData > > imu_data
Our history of IMU messages (time, angular, linear)
Definition: StaticInitializer.h:92
ov_type
ov_init::StaticInitializer::StaticInitializer
StaticInitializer(InertialInitializerOptions &params_, std::shared_ptr< ov_core::FeatureDatabase > db, std::shared_ptr< std::vector< ov_core::ImuData >> imu_data_)
Default constructor.
Definition: StaticInitializer.h:59
InertialInitializerOptions.h
ov_core


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