20#ifndef STATE_ELEMENTS_HPP
21#define STATE_ELEMENTS_HPP
25#include "types/fptypes.hpp"
36enum class MSCEqFStateElementName
97 virtual std::unique_ptr<MSCEqFStateElement>
clone()
const = 0;
143 void updateRight(
const VectorX& delta)
override {
Dd_.multiplyRight(SDB::exp(delta)); }
150 void updateLeft(
const VectorX& delta)
override {
Dd_.multiplyLeft(SDB::exp(delta)); }
157 std::unique_ptr<MSCEqFStateElement>
clone()
const override {
return std::make_unique<MSCEqFSDBState>(*
this); }
186 void updateRight(
const VectorX& delta)
override {
E_.multiplyRight(SE3::exp(delta)); }
193 void updateLeft(
const VectorX& delta)
override {
E_.multiplyLeft(SE3::exp(delta)); }
200 std::unique_ptr<MSCEqFStateElement>
clone()
const override {
return std::make_unique<MSCEqFSE3State>(*
this); }
229 void updateRight(
const VectorX& delta)
override {
L_.multiplyRight(In::exp(delta)); }
236 void updateLeft(
const VectorX& delta)
override {
L_.multiplyLeft(In::exp(delta)); }
243 std::unique_ptr<MSCEqFStateElement>
clone()
const override {
return std::make_unique<MSCEqFInState>(*
this); }
272 void updateRight(
const VectorX& delta)
override {
Q_.multiplyRight(SOT3::exp(delta)); }
279 void updateLeft(
const VectorX& delta)
override {
Q_.multiplyLeft(SOT3::exp(delta)); }
286 std::unique_ptr<MSCEqFStateElement>
clone()
const override {
return std::make_unique<MSCEqFSOT3State>(*
this); }
291using MSCEqFStateElementSharedPtr = std::shared_ptr<MSCEqFStateElement>;
292using MSCEqFStateElementUniquePtr = std::unique_ptr<MSCEqFStateElement>;
293using MSCEqFSDBStateSharedPtr = std::shared_ptr<MSCEqFSDBState>;
294using MSCEqFSDBStateUniquePtr = std::unique_ptr<MSCEqFSDBState>;
295using MSCEqFSE3StateSharedPtr = std::shared_ptr<MSCEqFSE3State>;
296using MSCEqFSE3StateUniquePtr = std::unique_ptr<MSCEqFSE3State>;
297using MSCEqFInStateSharedPtr = std::shared_ptr<MSCEqFInState>;
298using MSCEqFInStateUniquePtr = std::unique_ptr<MSCEqFInState>;
299using MSCEqFSOT3StateSharedPtr = std::shared_ptr<MSCEqFSOT3State>;
300using MSCEqFSOT3StateUniquePtr = std::unique_ptr<MSCEqFSOT3State>;
310[[nodiscard]]
static MSCEqFStateElementUniquePtr createMSCEqFStateElement(
const uint& idx)
312 if constexpr (std::is_base_of_v<MSCEqFStateElement, T>)
314 return std::make_unique<T>(idx);
uint idx_
Starting index of the element in the residual, and in the covariance.
Definition state_elements.hpp:115
virtual std::unique_ptr< MSCEqFStateElement > clone() const =0
Clone.
void updateIndex(const uint &new_idx)
Update index.
Definition state_elements.hpp:76
const uint & getIndex()
Get the starting index of the state element in the residual, and in the covariance.
Definition state_elements.hpp:62
virtual void updateRight(const VectorX &delta)=0
update function to update the value of the state element by right multiplication
const uint & getDof()
Get the degrees of freedom of the state element (dimension of relative covariance and residual block)...
Definition state_elements.hpp:69
MSCEqFStateElement()=delete
Rule of Five.
virtual void updateLeft(const VectorX &delta)=0
update function to update the value of the state element by left multiplication
uint dof_
Degrees of freedom of the element (dimension of relative covariance and residual block).
Definition state_elements.hpp:116
MSCEqFStateElement(const uint &idx, const uint &dof)
Construct a MSCEqFStateElement object.
Definition state_elements.hpp:113
std::unique_ptr< MSCEqFStateElement > clone() const override
Clone the Special Intrinsic (In) element of state of the MSCEqF.
Definition state_elements.hpp:243
MSCEqFInState(const uint &idx)
Construct an identity MSCEqFInState object.
Definition state_elements.hpp:222
In L_
The Intrinsic element of the state.
Definition state_elements.hpp:245
void updateLeft(const VectorX &delta) override
Update the Intrinsic element of the state by left multiplication.
Definition state_elements.hpp:236
MSCEqFInState()=delete
Deleted default constructor.
void updateRight(const VectorX &delta) override
Update the Intrinsic element of the state by right multiplication.
Definition state_elements.hpp:229
void updateRight(const VectorX &delta) override
Update the Semi Direct Bias element of the state by right multiplication.
Definition state_elements.hpp:143
MSCEqFSDBState(const uint &idx)
Construct an identity MSCEqFSDBState object.
Definition state_elements.hpp:136
SDB Dd_
The Semi Direct Bias element of the state.
Definition state_elements.hpp:159
void updateLeft(const VectorX &delta) override
Update the Semi Direct Bias element of the state by left multiplication.
Definition state_elements.hpp:150
std::unique_ptr< MSCEqFStateElement > clone() const override
Clone the Semi Direct bias (SDB) element of state of the MSCEqF.
Definition state_elements.hpp:157
MSCEqFSDBState()=delete
Deleted default constructor.
std::unique_ptr< MSCEqFStateElement > clone() const override
Clone the Special Euclidean Group (SE3) element of state of the MSCEqF.
Definition state_elements.hpp:200
MSCEqFSE3State(const uint &idx)
Construct an identity MSCEqFSE3State object.
Definition state_elements.hpp:179
MSCEqFSE3State()=delete
Deleted default constructor.
void updateLeft(const VectorX &delta) override
Update the Special Euclidean Group element of the state by left multiplication.
Definition state_elements.hpp:193
SE3 E_
The Special Euclidean element of the state.
Definition state_elements.hpp:202
void updateRight(const VectorX &delta) override
Update the Special Euclidean Group element of the state by right multiplication.
Definition state_elements.hpp:186
MSCEqFSOT3State()=delete
Deleted default constructor.
MSCEqFSOT3State(const uint &idx)
Construct an identity MSCEqFSOT3State object.
Definition state_elements.hpp:265
void updateLeft(const VectorX &delta) override
Update the Scaled Orthogonal Transforms element of the state by left multiplication.
Definition state_elements.hpp:279
std::unique_ptr< MSCEqFStateElement > clone() const override
Clone the Scaled Orthogonal Transforms (SOT3) element of state of the MSCEqF.
Definition state_elements.hpp:286
void updateRight(const VectorX &delta) override
Update the Scaled Orthogonal Transforms element of the state by right multiplication.
Definition state_elements.hpp:272
SOT3 Q_
The Scaled Orthogonal Transforms element of the state.
Definition state_elements.hpp:288