MSCEqF 1.0
Multi State Constraint Equivariant Filter for visual inertial navigation
Loading...
Searching...
No Matches
static_initializer.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 BSD-2-Clause-License with
7// no commercial use allowed, the full terms of which are made available
8// in the LICENSE file. No license in patents is granted.
9//
10// You can contact the authors at <alessandro.fornasier@ieee.org>
11
12#ifndef STATIC_INITIALIZER_HPP
13#define STATIC_INITIALIZER_HPP
14
15#include "msceqf/filter/checker/checker.hpp"
16#include "sensors/sensor_data.hpp"
17
18namespace msceqf
19{
21{
22 public:
23 using ImuBuffer = std::deque<Imu>;
24
31 StaticInitializer(const InitializerOptions& opts, const Checker& checker);
32
38 void insertImu(const Imu& imu);
39
47 [[nodiscard]] bool detectMotion(const Tracks& tracks);
48
55 [[nodiscard]] bool initializeOrigin();
56
62 [[nodiscard]] const SE23& T0() const;
63
69 [[nodiscard]] const Vector6& b0() const;
70
71 private:
79 [[nodiscard]] bool detectAccelerationSpike();
80
92 [[nodiscard]] bool imuMeanStd(Vector3& acc_mean, Vector3& ang_mean, fp& acc_std) const;
93
101 void computeOrigin(Vector3& acc_mean, Vector3& ang_mean);
102
103 InitializerOptions opts_;
104
105 const Checker& checker_; // The MSCEqF checker
106
107 ImuBuffer imu_buffer_;
108
109 SE23 T0_;
110 Vector6 b0_;
111};
112
113} // namespace msceqf
114
115#endif // STATIC_INITIALIZER_HPP
Simple class to perform various checks.
Definition checker.hpp:27
Definition static_initializer.hpp:21
bool initializeOrigin()
This fnctions collects a predefined window of IMU measurments and compute the roll and pitch fo the p...
const Vector6 & b0() const
This function returns the initial IMU bias, to be used as origin.
const SE23 & T0() const
This function returns the initial Extended pose of the platform, to be used as origin.
bool detectMotion(const Tracks &tracks)
This function detects if the platform is moving based on acceleration measurements and image disparit...
StaticInitializer(const InitializerOptions &opts, const Checker &checker)
StaticInitializer constructor.
std::deque< Imu > ImuBuffer
The Imu measurement buffer.
Definition static_initializer.hpp:23
void insertImu(const Imu &imu)
Populate imu internal buffer used for acceleration check.
Struct for one IMU reading. It includes timestamp, angular velocity and linear acceleration....
Definition sensor_data.hpp:29
Definition msceqf_options.hpp:143