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 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 STATIC_INITIALIZER_HPP
21#define STATIC_INITIALIZER_HPP
22
23#include "msceqf/filter/checker/checker.hpp"
24#include "sensors/sensor_data.hpp"
25
26namespace msceqf
27{
29{
30 public:
31 using ImuBuffer = std::deque<Imu>;
32
39 StaticInitializer(const InitializerOptions& opts, const Checker& checker);
40
46 void insertImu(const Imu& imu);
47
54
55 [[nodiscard]] bool detectMotion(const Tracks& tracks);
56
63 [[nodiscard]] bool initializeOrigin();
64
70 [[nodiscard]] const SE23& T0() const;
71
77 [[nodiscard]] const Vector6& b0() const;
78
79 private:
87 [[nodiscard]] bool detectAccelerationSpike();
88
100 [[nodiscard]] bool imuMeanStd(Vector3& acc_mean, Vector3& ang_mean, fp& acc_std) const;
101
109 void computeOrigin(Vector3& acc_mean, Vector3& ang_mean);
110
111 InitializerOptions opts_;
112
113 const Checker& checker_; // The MSCEqF checker
114
115 ImuBuffer imu_buffer_;
116
117 SE23 T0_;
118 Vector6 b0_;
119};
120
121} // namespace msceqf
122
123#endif // STATIC_INITIALIZER_HPP
Simple class to perform various checks.
Definition checker.hpp:35
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:31
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:37
Definition msceqf_options.hpp:151