MSCEqF
1.0
Multi State Constraint Equivariant Filter for visual inertial navigation
Toggle main menu visibility
Loading...
Searching...
No Matches
propagator.hpp
1
// Copyright (C) 2023 Alessandro Fornasier.
2
// Control of Networked Systems, University of Klagenfurt, Austria.
3
//
4
// All rights reserved.
5
//
6
// This software is licensed under the terms of the Apache License, Version 2.0
7
// (the "License"); you may not use this file except in compliance with the
8
// License. You may obtain a copy of the License at
9
//
10
// http://www.apache.org/licenses/LICENSE-2.0
11
//
12
// Unless required by applicable law or agreed to in writing, software
13
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15
// License for the specific language governing permissions and limitations
16
// under the License.
17
//
18
// You can contact the authors at <alessandro.fornasier@ieee.org>
19
20
#ifndef PROPAGATOR_HPP
21
#define PROPAGATOR_HPP
22
23
#include "msceqf/options/msceqf_options.hpp"
24
#include "msceqf/symmetry/symmetry.hpp"
25
#include "sensors/sensor_data.hpp"
26
#include "msceqf/state/state.hpp"
27
#include "types/fptypes.hpp"
28
#include "utils/tools.hpp"
29
30
namespace
msceqf
31
{
32
class
Propagator
33
{
34
public
:
35
using
ImuBuffer
= std::deque<Imu>;
36
42
Propagator
(
const
PropagatorOptions
& opts);
43
56
void
insertImu
(
MSCEqFState
& X,
const
SystemState
& xi0,
const
Imu
& imu, fp& timestamp);
57
67
bool
propagate
(
MSCEqFState
& X,
const
SystemState
& xi0, fp& timestamp,
const
fp& new_timestamp);
68
69
private
:
84
ImuBuffer
getImuReadings(
const
fp& t0,
const
fp& t1);
85
94
Imu
lerp(
const
Imu
& pre,
const
Imu
& post,
const
fp& alpha);
95
104
void
propagateMean(
MSCEqFState
& X,
const
SystemState
& xi0,
const
Imu
& u,
const
fp& dt);
105
114
void
propagateCovariance(
MSCEqFState
& X,
const
SystemState
& xi0,
const
Imu
& u,
const
fp& dt);
115
126
const
MatrixX stateMatrix(
MSCEqFState
& X,
const
SystemState
& xi0,
const
Imu
& u)
const
;
127
135
const
MatrixX inputMatrix(
MSCEqFState
& X,
const
SystemState
& xi0)
const
;
136
154
const
MatrixX discreteTimeMatrix(
const
MatrixX& A,
const
MatrixX& B,
const
fp& dt)
const
;
155
156
ImuBuffer
imu_buffer_;
157
Matrix12 Q_;
158
159
int
state_transition_order_;
160
uint imu_buffer_max_size_;
161
162
std::mutex mutex_;
163
164
static
constexpr
fp eps_ = 1e-6;
165
};
166
167
}
// namespace msceqf
168
169
#endif
// PROPAGATOR_HPP
msceqf::MSCEqFState
this class represent the state of the MSCEqF. This includes the state of the lifted system (element o...
Definition
state.hpp:38
msceqf::Propagator::Propagator
Propagator(const PropagatorOptions &opts)
Construct a Propagator object given the options.
msceqf::Propagator::ImuBuffer
std::deque< Imu > ImuBuffer
The Imu measurement buffer.
Definition
propagator.hpp:35
msceqf::Propagator::insertImu
void insertImu(MSCEqFState &X, const SystemState &xi0, const Imu &imu, fp ×tamp)
insert a new IMU measurement into the imu buffer, if the given IMU measurement has a grater timestamp...
msceqf::Propagator::propagate
bool propagate(MSCEqFState &X, const SystemState &xi0, fp ×tamp, const fp &new_timestamp)
This function implements the mean and covariance propagation from timestamp to new_timestamp for the ...
msceqf::SystemState
The SystemState class represent the state of the system posed on the Homogenous space.
Definition
system.hpp:37
msceqf::Imu
Struct for one IMU reading. It includes timestamp, angular velocity and linear acceleration....
Definition
sensor_data.hpp:37
msceqf::PropagatorOptions
Definition
msceqf_options.hpp:120
include
msceqf
filter
propagator
propagator.hpp
Generated by
1.17.0