CpiV2.h
Go to the documentation of this file.
1 #ifndef CPI_V2_H
2 #define CPI_V2_H
3 
4 /*
5  * MIT License
6  * Copyright (c) 2018 Kevin Eckenhoff
7  * Copyright (c) 2018 Patrick Geneva
8  * Copyright (c) 2018 Guoquan Huang
9  *
10  * Permission is hereby granted, free of charge, to any person obtaining a copy
11  * of this software and associated documentation files (the "Software"), to deal
12  * in the Software without restriction, including without limitation the rights
13  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14  * copies of the Software, and to permit persons to whom the Software is
15  * furnished to do so, subject to the following conditions:
16  *
17  * The above copyright notice and this permission notice shall be included in all
18  * copies or substantial portions of the Software.
19  *
20  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26  * SOFTWARE.
27  */
28 
29 #include "CpiBase.h"
30 
31 #include <Eigen/Dense>
32 
33 namespace ov_core {
34 
49 class CpiV2 : public CpiBase {
50 
51 private:
52  // Extended covariance used to handle the sampling model
53  Eigen::Matrix<double, 21, 21> P_big = Eigen::Matrix<double, 21, 21>::Zero();
54 
55  // Our large compounded state transition Jacobian matrix
56  Eigen::Matrix<double, 21, 21> Discrete_J_b = Eigen::Matrix<double, 21, 21>::Identity();
57 
58 public:
66 
67  // Alpha and beta Jacobians wrt linearization orientation
68  Eigen::Matrix<double, 3, 3> O_a = Eigen::Matrix<double, 3, 3>::Zero();
69  Eigen::Matrix<double, 3, 3> O_b = Eigen::Matrix<double, 3, 3>::Zero();
70 
79  CpiV2(double sigma_w, double sigma_wb, double sigma_a, double sigma_ab, bool imu_avg_ = false)
80  : CpiBase(sigma_w, sigma_wb, sigma_a, sigma_ab, imu_avg_) {}
81 
82  virtual ~CpiV2() {}
83 
97  void feed_IMU(double t_0, double t_1, Eigen::Matrix<double, 3, 1> w_m_0, Eigen::Matrix<double, 3, 1> a_m_0,
98  Eigen::Matrix<double, 3, 1> w_m_1 = Eigen::Matrix<double, 3, 1>::Zero(),
99  Eigen::Matrix<double, 3, 1> a_m_1 = Eigen::Matrix<double, 3, 1>::Zero());
100 };
101 
102 } // namespace ov_core
103 
104 #endif /* CPI_V2_H */
ov_core::CpiBase
Base class for continuous preintegration integrators.
Definition: CpiBase.h:49
ov_core::CpiV2::state_transition_jacobians
bool state_transition_jacobians
If we want to use analytical jacobians or not. In the paper we just numerically integrated the jacobi...
Definition: CpiV2.h:65
ov_core::CpiV2::CpiV2
CpiV2(double sigma_w, double sigma_wb, double sigma_a, double sigma_ab, bool imu_avg_=false)
Default constructor for our Model 2 preintegration (piecewise constant local acceleration assumption)
Definition: CpiV2.h:79
ov_core::CpiV2::O_a
Eigen::Matrix< double, 3, 3 > O_a
Definition: CpiV2.h:68
ov_core::CpiV2::P_big
Eigen::Matrix< double, 21, 21 > P_big
Definition: CpiV2.h:53
ov_core::CpiV2
Model 2 of continuous preintegration.
Definition: CpiV2.h:49
ov_core::CpiV2::feed_IMU
void feed_IMU(double t_0, double t_1, Eigen::Matrix< double, 3, 1 > w_m_0, Eigen::Matrix< double, 3, 1 > a_m_0, Eigen::Matrix< double, 3, 1 > w_m_1=Eigen::Matrix< double, 3, 1 >::Zero(), Eigen::Matrix< double, 3, 1 > a_m_1=Eigen::Matrix< double, 3, 1 >::Zero())
Our precompound function for Model 2.
Definition: CpiV2.cpp:33
ov_core::CpiV2::~CpiV2
virtual ~CpiV2()
Definition: CpiV2.h:82
CpiBase.h
ov_core
Core algorithms for OpenVINS.
Definition: CamBase.h:30
ov_core::CpiV2::O_b
Eigen::Matrix< double, 3, 3 > O_b
Definition: CpiV2.h:69
ov_core::CpiV2::Discrete_J_b
Eigen::Matrix< double, 21, 21 > Discrete_J_b
Definition: CpiV2.h:56


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