InertialInitializer.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_INERTIALINITIALIZER_H
23 #define OV_INIT_INERTIALINITIALIZER_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 
38 class StaticInitializer;
39 class DynamicInitializer;
40 
61 
62 public:
68  explicit InertialInitializer(InertialInitializerOptions &params_, std::shared_ptr<ov_core::FeatureDatabase> db);
69 
75  void feed_imu(const ov_core::ImuData &message, double oldest_time = -1);
76 
97  bool initialize(double &timestamp, Eigen::MatrixXd &covariance, std::vector<std::shared_ptr<ov_type::Type>> &order,
98  std::shared_ptr<ov_type::IMU> t_imu, bool wait_for_jerk = true);
99 
100 protected:
103 
105  std::shared_ptr<ov_core::FeatureDatabase> _db;
106 
108  std::shared_ptr<std::vector<ov_core::ImuData>> imu_data;
109 
111  std::shared_ptr<StaticInitializer> init_static;
112 
114  std::shared_ptr<DynamicInitializer> init_dynamic;
115 };
116 
117 } // namespace ov_init
118 
119 #endif // OV_INIT_INERTIALINITIALIZER_H
ov_init::InertialInitializer::imu_data
std::shared_ptr< std::vector< ov_core::ImuData > > imu_data
Our history of IMU messages (time, angular, linear)
Definition: InertialInitializer.h:108
ov_init::InertialInitializer::InertialInitializer
InertialInitializer(InertialInitializerOptions &params_, std::shared_ptr< ov_core::FeatureDatabase > db)
Default constructor.
Definition: InertialInitializer.cpp:38
ov_init::InertialInitializer::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.
Definition: InertialInitializer.cpp:73
ov_init::InertialInitializerOptions
Struct which stores all options needed for state estimation.
Definition: InertialInitializerOptions.h:49
ov_init::InertialInitializer::init_static
std::shared_ptr< StaticInitializer > init_static
Static initialization helper class.
Definition: InertialInitializer.h:111
ov_init::InertialInitializer
Initializer for visual-inertial system.
Definition: InertialInitializer.h:60
ov_init::InertialInitializer::init_dynamic
std::shared_ptr< DynamicInitializer > init_dynamic
Dynamic initialization helper class.
Definition: InertialInitializer.h:114
ov_init::InertialInitializer::feed_imu
void feed_imu(const ov_core::ImuData &message, double oldest_time=-1)
Feed function for inertial data.
Definition: InertialInitializer.cpp:49
ov_init::InertialInitializer::_db
std::shared_ptr< ov_core::FeatureDatabase > _db
Feature tracker database with all features in it.
Definition: InertialInitializer.h:105
ov_init
State initialization code.
Definition: Factor_GenericPrior.h:27
ov_core::ImuData
ov_type
ov_init::InertialInitializer::params
InertialInitializerOptions params
Initialization parameters.
Definition: InertialInitializer.h:102
InertialInitializerOptions.h
ov_core


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