![]() |
MSCEqF 1.0
Multi State Constraint Equivariant Filter for visual inertial navigation
|
this class represent the state of the MSCEqF. This includes the state of the lifted system (element of the symmetry group) and the covariance. More...
#include <state.hpp>
Public Types | |
using | MSCEqFStateKey = std::variant<MSCEqFStateElementName, uint> |
Key to access the msceqf state map. | |
using | MSCEqFKey = std::variant<MSCEqFStateKey, fp> |
Key to access the msceqf state and clones map. | |
using | MSCEqFStateMap = std::unordered_map<MSCEqFStateKey, MSCEqFStateElementSharedPtr> |
MSCEqF state map. | |
using | MSCEqFClonesMap = std::map<fp, MSCEqFStateElementSharedPtr> |
MSCEqF clones map. | |
Public Member Functions | |
MSCEqFState ()=delete | |
Deleted default constructor. | |
MSCEqFState (const StateOptions &opts, const SystemState &xi0) | |
Construct the state of the MSCEqF given the options. | |
MSCEqFState (const MSCEqFState &other) | |
Rule of Five. | |
MSCEqFState (MSCEqFState &&other) noexcept | |
MSCEqFState & | operator= (const MSCEqFState &other) |
MSCEqFState & | operator= (MSCEqFState &&other) noexcept |
const SE23 & | D () const |
Get a reference to the SE23 component of the Semi Direct Bias Group element of the MSCEqF state. | |
const SE3 | B () const |
Get a copy of the SE3 component of the Semi Direct Bias Group element of the MSCEqF state that includes the rotational component (R) and the first isometry (v) | |
const SE3 | C () const |
Get a copy of to the SE3 component of the Semi Direct Bias Group element of the MSCEqF state that includes the rotational component (R) and the second isometry (p) | |
const Vector6 & | delta () const |
Get a reference to the R6 component of the Semi Direct Bias Group element of the MSCEqF state. | |
const SE3 & | E () const |
Get a reference to the SE3 element of the MSCEqF state. | |
const In & | L () const |
Get a reference to the In element of the MSCEqF state. | |
const SOT3 & | Q (const uint &feat_id) const |
Get a reference to the SOT3 element of the MSCEqF state that correspond to the given feature id. | |
const SE3 & | clone (const fp ×tamp) const |
Get a reference to the SE3 element of the MSCEqF clones that correspond to the given timestamp. | |
const uint & | index (const MSCEqFKey &key) const |
Get a reference to the index of the state element or the clone element corresponding to the given key. | |
const uint & | dof (const MSCEqFKey &key) const |
Get a reference to the dof of the state element or the clone element corresponding to the given key. | |
size_t | clonesSize () const |
Get the amount of clones. | |
const fp & | cloneTimestampToMarginalize () const |
Get the timestamp of the clone to marginalize. We implement our keyframing strategy here. So far we simply marginalize the oldest clone. | |
const MatrixX & | cov () const |
Get a reference to the covariance matrix. | |
const MatrixX | covBlock (const MSCEqFKey &key) const |
get a constant copy of the covariance block relative to the elements (states or clones) corresponding to the given keys. | |
const MatrixX | subCov (const std::vector< MSCEqFKey > &keys) const |
Get a constant copy of the the covariance submatrix (including cross-correlations) constructed with covariance blocks relative to the elements (states or clones) corresponding to the given keys. The ordering of the covariance returned follows the ordering of the given keys. | |
const MatrixX | subCovCols (const std::vector< MSCEqFKey > &keys) const |
Get a constant copy of the the covariance submatrix (including cross-correlations) constructed with covariance columns relative to the elements (states or clones) corresponding to the given keys. The ordering of the covariance returned follows the ordering of the given keys. | |
const StateOptions & | opts () const |
Get the state options. | |
void | initializeStateElement (const MSCEqFStateKey &key, const MatrixX &cov_block) |
Initialize MSCEqF state element into the state map, and the relative covariance block. | |
void | stochasticCloning (const fp ×tamp) |
Augment the MSCEqF clones map with a new clone of the actual E element of the MSCEqF state. The new clone is mapped via the given timestamp. | |
void | marginalizeCloneAt (const fp ×tamp) |
Marginalize out clone at a given timestamp. | |
const MSCEqFState | Random () const |
Return a random MSCEqF state without changing this. This method *WILL NOT change the actual values of the state. This method WILL NOT initialize the covariance or the clones map for the returned state. This method will only initialize the state map with random values for the returned state. | |
const MSCEqFState | operator* (const MSCEqFState &other) const |
operator* overloading for MSCEqFState. This function will perform the composition this * other for each element of the state map. This method will NOT perform any composition for the covariance matrix, and for the clones map. | |
Static Public Member Functions | |
static std::string | toString (const MSCEqFStateKey &key) |
Get a string describing the given MSCEqFStateKey. | |
Friends | |
class | Symmetry |
Symmetry can access private members of MSCEqFState. | |
class | Propagator |
Propagator can access private members of MSCEqFState. | |
class | Updater |
Updater can access private members of MSCEqFState. | |
class | ZeroVelocityUpdater |
Zero velocity updater can access private members of MSCEqFState. | |
this class represent the state of the MSCEqF. This includes the state of the lifted system (element of the symmetry group) and the covariance.
msceqf::MSCEqFState::MSCEqFState | ( | const StateOptions & | opts, |
const SystemState & | xi0 ) |
Construct the state of the MSCEqF given the options.
opts | Options of the MSCEqF state |
xi0 | Origin |
|
nodiscard |
Get a copy of the SE3 component of the Semi Direct Bias Group element of the MSCEqF state that includes the rotational component (R) and the first isometry (v)
|
nodiscard |
Get a copy of to the SE3 component of the Semi Direct Bias Group element of the MSCEqF state that includes the rotational component (R) and the second isometry (p)
|
nodiscard |
Get a reference to the SE3 element of the MSCEqF clones that correspond to the given timestamp.
timestamp | Timestamp |
|
inlinenodiscard |
Get the amount of clones.
|
nodiscard |
Get the timestamp of the clone to marginalize. We implement our keyframing strategy here. So far we simply marginalize the oldest clone.
|
nodiscard |
Get a reference to the covariance matrix.
|
nodiscard |
get a constant copy of the covariance block relative to the elements (states or clones) corresponding to the given keys.
key | State element name, feature id or timestamp of clone |
|
nodiscard |
|
nodiscard |
|
nodiscard |
Get a reference to the dof of the state element or the clone element corresponding to the given key.
key | State element name, feature id or timestamp of clone |
|
nodiscard |
|
nodiscard |
Get a reference to the index of the state element or the clone element corresponding to the given key.
key | State element name, feature id or timestamp of clone |
void msceqf::MSCEqFState::initializeStateElement | ( | const MSCEqFStateKey & | key, |
const MatrixX & | cov_block ) |
Initialize MSCEqF state element into the state map, and the relative covariance block.
key | State element name or feature id |
cov_block | Corresponding blcok of the covariance matrix |
|
nodiscard |
void msceqf::MSCEqFState::marginalizeCloneAt | ( | const fp & | timestamp | ) |
Marginalize out clone at a given timestamp.
timestamp | Timestamp of the clone to marginalize |
|
nodiscard |
operator* overloading for MSCEqFState. This function will perform the composition this * other for each element of the state map. This method will NOT perform any composition for the covariance matrix, and for the clones map.
other | MSCEqF state |
|
inlinenodiscard |
Get the state options.
|
nodiscard |
Get a reference to the SOT3 element of the MSCEqF state that correspond to the given feature id.
feat_id | Feature id |
|
nodiscard |
Return a random MSCEqF state without changing this. This method *WILL NOT change the actual values of the state. This method WILL NOT initialize the covariance or the clones map for the returned state. This method will only initialize the state map with random values for the returned state.
void msceqf::MSCEqFState::stochasticCloning | ( | const fp & | timestamp | ) |
|
nodiscard |
Get a constant copy of the the covariance submatrix (including cross-correlations) constructed with covariance blocks relative to the elements (states or clones) corresponding to the given keys. The ordering of the covariance returned follows the ordering of the given keys.
keys | Vector of state elements name, feature id or timestamp of clone |
|
nodiscard |
Get a constant copy of the the covariance submatrix (including cross-correlations) constructed with covariance columns relative to the elements (states or clones) corresponding to the given keys. The ordering of the covariance returned follows the ordering of the given keys.
keys | Vector of state elements name, feature id or timestamp of clone |
|
static |
Get a string describing the given MSCEqFStateKey.
key | State element name or feature id |