12#ifndef STATE_ELEMENTS_HPP
13#define STATE_ELEMENTS_HPP
17#include "types/fptypes.hpp"
28enum class MSCEqFStateElementName
89 virtual std::unique_ptr<MSCEqFStateElement>
clone()
const = 0;
135 void updateRight(
const VectorX& delta)
override {
Dd_.multiplyRight(SDB::exp(delta)); }
142 void updateLeft(
const VectorX& delta)
override {
Dd_.multiplyLeft(SDB::exp(delta)); }
149 std::unique_ptr<MSCEqFStateElement>
clone()
const override {
return std::make_unique<MSCEqFSDBState>(*
this); }
178 void updateRight(
const VectorX& delta)
override {
E_.multiplyRight(SE3::exp(delta)); }
185 void updateLeft(
const VectorX& delta)
override {
E_.multiplyLeft(SE3::exp(delta)); }
192 std::unique_ptr<MSCEqFStateElement>
clone()
const override {
return std::make_unique<MSCEqFSE3State>(*
this); }
221 void updateRight(
const VectorX& delta)
override {
L_.multiplyRight(In::exp(delta)); }
228 void updateLeft(
const VectorX& delta)
override {
L_.multiplyLeft(In::exp(delta)); }
235 std::unique_ptr<MSCEqFStateElement>
clone()
const override {
return std::make_unique<MSCEqFInState>(*
this); }
264 void updateRight(
const VectorX& delta)
override {
Q_.multiplyRight(SOT3::exp(delta)); }
271 void updateLeft(
const VectorX& delta)
override {
Q_.multiplyLeft(SOT3::exp(delta)); }
278 std::unique_ptr<MSCEqFStateElement>
clone()
const override {
return std::make_unique<MSCEqFSOT3State>(*
this); }
283using MSCEqFStateElementSharedPtr = std::shared_ptr<MSCEqFStateElement>;
284using MSCEqFStateElementUniquePtr = std::unique_ptr<MSCEqFStateElement>;
285using MSCEqFSDBStateSharedPtr = std::shared_ptr<MSCEqFSDBState>;
286using MSCEqFSDBStateUniquePtr = std::unique_ptr<MSCEqFSDBState>;
287using MSCEqFSE3StateSharedPtr = std::shared_ptr<MSCEqFSE3State>;
288using MSCEqFSE3StateUniquePtr = std::unique_ptr<MSCEqFSE3State>;
289using MSCEqFInStateSharedPtr = std::shared_ptr<MSCEqFInState>;
290using MSCEqFInStateUniquePtr = std::unique_ptr<MSCEqFInState>;
291using MSCEqFSOT3StateSharedPtr = std::shared_ptr<MSCEqFSOT3State>;
292using MSCEqFSOT3StateUniquePtr = std::unique_ptr<MSCEqFSOT3State>;
302[[nodiscard]]
static MSCEqFStateElementUniquePtr createMSCEqFStateElement(
const uint& idx)
304 if constexpr (std::is_base_of_v<MSCEqFStateElement, T>)
306 return std::make_unique<T>(idx);
This class represent the base class for a general element of the MSCEqF state. This include the index...
Definition state_elements.hpp:45
uint idx_
Starting index of the element in the residual, and in the covariance.
Definition state_elements.hpp:107
virtual std::unique_ptr< MSCEqFStateElement > clone() const =0
Clone.
void updateIndex(const uint &new_idx)
Update index.
Definition state_elements.hpp:68
const uint & getIndex()
Get the starting index of the state element in the residual, and in the covariance.
Definition state_elements.hpp:54
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:61
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:108
MSCEqFStateElement(const uint &idx, const uint &dof)
Construct a MSCEqFStateElement object.
Definition state_elements.hpp:105
This struct represent the Intrinsic state of the MSCEqF.
Definition state_elements.hpp:202
std::unique_ptr< MSCEqFStateElement > clone() const override
Clone the Special Intrinsic (In) element of state of the MSCEqF.
Definition state_elements.hpp:235
MSCEqFInState(const uint &idx)
Construct an identity MSCEqFInState object.
Definition state_elements.hpp:214
In L_
The Intrinsic element of the state.
Definition state_elements.hpp:237
void updateLeft(const VectorX &delta) override
Update the Intrinsic element of the state by left multiplication.
Definition state_elements.hpp:228
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:221
This struct represent the Semi Direct bias state of the MSCEqF.
Definition state_elements.hpp:116
void updateRight(const VectorX &delta) override
Update the Semi Direct Bias element of the state by right multiplication.
Definition state_elements.hpp:135
MSCEqFSDBState(const uint &idx)
Construct an identity MSCEqFSDBState object.
Definition state_elements.hpp:128
SDB Dd_
The Semi Direct Bias element of the state.
Definition state_elements.hpp:151
void updateLeft(const VectorX &delta) override
Update the Semi Direct Bias element of the state by left multiplication.
Definition state_elements.hpp:142
std::unique_ptr< MSCEqFStateElement > clone() const override
Clone the Semi Direct bias (SDB) element of state of the MSCEqF.
Definition state_elements.hpp:149
MSCEqFSDBState()=delete
Deleted default constructor.
This struct represent the Special Euclidean Group of dimension 3 state of the MSCEqF.
Definition state_elements.hpp:159
std::unique_ptr< MSCEqFStateElement > clone() const override
Clone the Special Euclidean Group (SE3) element of state of the MSCEqF.
Definition state_elements.hpp:192
MSCEqFSE3State(const uint &idx)
Construct an identity MSCEqFSE3State object.
Definition state_elements.hpp:171
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:185
SE3 E_
The Special Euclidean element of the state.
Definition state_elements.hpp:194
void updateRight(const VectorX &delta) override
Update the Special Euclidean Group element of the state by right multiplication.
Definition state_elements.hpp:178
This struct represent the Scaled Orthogonal Transforms state of the MSCEqF.
Definition state_elements.hpp:245
MSCEqFSOT3State()=delete
Deleted default constructor.
MSCEqFSOT3State(const uint &idx)
Construct an identity MSCEqFSOT3State object.
Definition state_elements.hpp:257
void updateLeft(const VectorX &delta) override
Update the Scaled Orthogonal Transforms element of the state by left multiplication.
Definition state_elements.hpp:271
std::unique_ptr< MSCEqFStateElement > clone() const override
Clone the Scaled Orthogonal Transforms (SOT3) element of state of the MSCEqF.
Definition state_elements.hpp:278
void updateRight(const VectorX &delta) override
Update the Scaled Orthogonal Transforms element of the state by right multiplication.
Definition state_elements.hpp:264
SOT3 Q_
The Scaled Orthogonal Transforms element of the state.
Definition state_elements.hpp:280