MSCEqF 1.0
Multi State Constraint Equivariant Filter for visual inertial navigation
Loading...
Searching...
No Matches
msceqf::SystemState Class Reference

The SystemState class represent the state of the system posed on the Homogenous space. More...

#include <system.hpp>

Public Types

using SystemStateKey = std::variant<SystemStateElementName, uint>
 Key to access the system state map.
 
using SystemStateMap = std::unordered_map<SystemStateKey, SystemStateElementSharedPtr>
 System state map.
 
using SystemStateAlgebraMap = std::unordered_map<SystemStateKey, VectorX>
 System state algebra map.
 

Public Member Functions

 SystemState ()=delete
 Deleted default constructor.
 
 SystemState (const StateOptions &opts, const SE23 &T0=SE23(), const Vector6 &b0=Vector6::Zero())
 Initialize a system state with given extended pose and bias (Identity and zero by default). Camera intrinsics and extrinsics are initialized from the given values in the options.
 
template<typename... Args>
 SystemState (const StateOptions &opts, Args &&... pairs_of_key_ptr)
 Construct system state given a multiple pairs of key-pointer of states element. This methods preallocate memory for the state_ map and insert the given pointers. Camera intrinsics and extrinsics are initialized from the given values in the options, passing pairs of key-pointer of camera intrinsics and extrinsics will overwrite the intrinsics and extrinsics initialized form the given options.
 
 SystemState (const SystemState &other)
 Rule of Five.
 
 SystemState (SystemState &&other) noexcept
 
SystemStateoperator= (const SystemState &other)
 
SystemStateoperator= (SystemState &&other) noexcept
 
const SE23 & T () const
 return a constant reference to the extended pose element (R,v,p) of the system state as a SE23-torsor
 
const SE3 P () const
 return a copy of the pose element (R,p) of the system state as a SE3-torsor
 
const SE3 V () const
 return a copy of the pose element (R,v) of the system state as a SE3-torsor
 
const Vector6 & b () const
 return a constant reference to the bias element of the system state as a vector
 
const SE3 & S () const
 return a constant reference to the camera extrinsics element of the system state as a SE3-torsor. If the camera extrinsics are not estimated online then the fixed calibration value provided in the options is returned
 
const In & K () const
 return a constant reference to the camera intrinsics element of the system state as a In-torsor If the camera intrinsics are not are not estimated online then the fixed calibration value provided in the options is returned
 
const Vector4 k () const
 return a copy of the camera intrinsics element of the system state as a 4-vector If the camera intrinsics are not are not estimated online then the fixed calibration value provided in the options is returned
 
const Vector3 & f (const uint &feat_id) const
 return a constant reference to a persistent feature element of the system state as a vector, given the feature id
 
const Vector3 ge3 () const
 return a copy of g*e3 as a vector
 
const StateOptionsopts () const
 Get the state options.
 

Static Public Member Functions

static std::string toString (const SystemStateKey &key)
 Get a string describing the given SystemStateKey.
 

Friends

class Symmetry
 Symmetry can access private members of SystemState.
 

Detailed Description

The SystemState class represent the state of the system posed on the Homogenous space.

Note
The system state has not to be confused with the MSCEqF state. The former is the state of the system posed on the homogenous space, while the latter is the state of the lifted system, in which the EqF is based on.

Constructor & Destructor Documentation

◆ SystemState() [1/2]

msceqf::SystemState::SystemState ( const StateOptions & opts,
const SE23 & T0 = SE23(),
const Vector6 & b0 = Vector6::Zero() )

Initialize a system state with given extended pose and bias (Identity and zero by default). Camera intrinsics and extrinsics are initialized from the given values in the options.

Parameters
optsState options
T0Initial extended pose
b0Initial bias

◆ SystemState() [2/2]

template<typename... Args>
msceqf::SystemState::SystemState ( const StateOptions & opts,
Args &&... pairs_of_key_ptr )
inline

Construct system state given a multiple pairs of key-pointer of states element. This methods preallocate memory for the state_ map and insert the given pointers. Camera intrinsics and extrinsics are initialized from the given values in the options, passing pairs of key-pointer of camera intrinsics and extrinsics will overwrite the intrinsics and extrinsics initialized form the given options.

Template Parameters
Args
Parameters
optsState options
keys_argsMultiple pairs of key-ptr where each pointer is pointing to a state elements
Note
Examples of call:
1) SystemState(opts, pair(key1, ptr1), pair(key2, ptr2), pair(key3, ptr3))
2) SystemState(opts, pair(key1, ptr1), vector(pair(key2, ptr2), ..., pair(key10, ptr10)))
When the function is called with a vector of pairs, the vector of pairs is moved therefore after the call it contains only unusable pointers (nullptr).
Here is the call graph for this function:

Member Function Documentation

◆ b()

const Vector6 & msceqf::SystemState::b ( ) const
nodiscard

return a constant reference to the bias element of the system state as a vector

Returns
R6 vector representing the bias element of the system state

◆ f()

const Vector3 & msceqf::SystemState::f ( const uint & feat_id) const
nodiscard

return a constant reference to a persistent feature element of the system state as a vector, given the feature id

Parameters
feat_idId of the persistent feature
Returns
R3 vector representing the feature element of the system state

◆ ge3()

const Vector3 msceqf::SystemState::ge3 ( ) const
nodiscard

return a copy of g*e3 as a vector

Returns
R3 vector representing the gravity vector in a gravity-aligned frame of reference

◆ K()

const In & msceqf::SystemState::K ( ) const
nodiscard

return a constant reference to the camera intrinsics element of the system state as a In-torsor If the camera intrinsics are not are not estimated online then the fixed calibration value provided in the options is returned

Returns
Intrinsic element of the system state as a In-torsor representing the camera intrinsics

◆ k()

const Vector4 msceqf::SystemState::k ( ) const
nodiscard

return a copy of the camera intrinsics element of the system state as a 4-vector If the camera intrinsics are not are not estimated online then the fixed calibration value provided in the options is returned

Returns
R4 vector representing the camera intrinsics

◆ opts()

const StateOptions & msceqf::SystemState::opts ( ) const
inlinenodiscard

Get the state options.

Returns
State options
Here is the caller graph for this function:

◆ P()

const SE3 msceqf::SystemState::P ( ) const
nodiscard

return a copy of the pose element (R,p) of the system state as a SE3-torsor

Returns
Pose element (R,p) of the system state as a SE3-torsor

◆ S()

const SE3 & msceqf::SystemState::S ( ) const
nodiscard

return a constant reference to the camera extrinsics element of the system state as a SE3-torsor. If the camera extrinsics are not estimated online then the fixed calibration value provided in the options is returned

Returns
Pose/Transformation element of the system state as a SE3-torsor representing the camera extrinsics

◆ T()

const SE23 & msceqf::SystemState::T ( ) const
nodiscard

return a constant reference to the extended pose element (R,v,p) of the system state as a SE23-torsor

Returns
Extended pose element (R,v,p) of the system state as a SE23-torsor

◆ toString()

static std::string msceqf::SystemState::toString ( const SystemStateKey & key)
static

Get a string describing the given SystemStateKey.

Parameters
keySystem state element name or feature id
Returns
String describing the given key

◆ V()

const SE3 msceqf::SystemState::V ( ) const
nodiscard

return a copy of the pose element (R,v) of the system state as a SE3-torsor

Returns
Homogeneous galilean element (R,v) of the system state as a SE3-torsor

The documentation for this class was generated from the following file: