OSVR-Core
Namespaces | Classes | Typedefs | Functions
osvr::kalman Namespace Reference

Header-only framework for building Kalman-style filters, prediction, and sensor fusion. More...

Namespaces

 matrix_exponential_map
 Utilities for interacting with a "matrix exponential map vector" rotation parameterization/formalism, where rotation is represented as a 3D vector that is turned into a rotation matrix by applying Rodrigues' formula that resembles a matrix exponential.
 
 types
 Type aliases, including template type aliases.
 

Classes

class  AbsoluteOrientationBase
 The measurement here has been split into a base and derived type, so that the derived type only contains the little bit that depends on a particular state type. More...
 
class  AbsoluteOrientationMeasurement
 This is the subclass of AbsoluteOrientationBase: only explicit specializations, and on state types. More...
 
class  AbsoluteOrientationMeasurement< pose_externalized_rotation::State >
 AbsoluteOrientationMeasurement with a pose_externalized_rotation::State. More...
 
class  AbsolutePositionBase
 The measurement here has been split into a base and derived type, so that the derived type only contains the little bit that depends on a particular state type. More...
 
class  AbsolutePositionMeasurement
 This is the subclass of AbsolutePositionBase: only explicit specializations, and on state types. More...
 
class  AbsolutePositionMeasurement< pose_externalized_rotation::State >
 AbsolutePositionMeasurement with a pose_externalized_rotation::State. More...
 
class  AngularVelocityBase
 
class  AngularVelocityMeasurement
 This is the subclass of AngularVelocityBase: only explicit specializations, and on state types. More...
 
class  AngularVelocityMeasurement< orient_externalized_rotation::State >
 AngularVelocityMeasurement with a orient_externalized_rotation::State The code is in fact identical except for the state types, due to a coincidence of how the state vectors are arranged. More...
 
class  AngularVelocityMeasurement< pose_externalized_rotation::State >
 AngularVelocityMeasurement with a pose_externalized_rotation::State. More...
 
class  AugmentedProcessModel
 Process model type that consists entirely of references to two sub-process models, for operating on an AugmentedState<>. More...
 
class  AugmentedSigmaPointGenerator
 
class  AugmentedState
 State type that consists entirely of references to two independent sub-states. More...
 
class  ConstantProcess
 A simple process model for a "constant" process: all prediction does at most is bump up the uncertainty. More...
 
struct  CorrectionInProgress
 
class  FlexibleKalmanFilter
 The main class implementing the common components of the Kalman family of filters. More...
 
struct  HasDimension
 Convenience base class for things (like states and measurements) that have a dimension. More...
 
class  IMUAngVelMeasurement
 
class  IMUOrientationMeasBase
 The measurement here has been split into a base and derived type, so that the derived type only contains the little bit that depends on a particular state type. More...
 
class  IMUOrientationMeasurement
 This is the subclass of AbsoluteOrientationBase: only explicit specializations, and on state types. More...
 
class  IMUOrientationMeasurement< pose_externalized_rotation::State, PolicyT >
 AbsoluteOrientationMeasurement with a pose_externalized_rotation::State. More...
 
class  OrientationConstantVelocityProcessModel
 A model for a 3DOF pose (with angular velocity) More...
 
class  PoseConstantVelocityProcessModel
 A constant-velocity model for a 6DOF pose (with velocities) More...
 
class  PoseDampedConstantVelocityProcessModel
 A basically-constant-velocity model, with the addition of some damping of the velocities inspired by TAG. More...
 
class  PoseSeparatelyDampedConstantVelocityProcessModel
 A basically-constant-velocity model, with the addition of some damping of the velocities inspired by TAG. More...
 
class  PureVectorState
 A very simple (3D by default) vector state with no velocity, ideal for use as a position, with ConstantProcess for beacon autocalibration. More...
 
class  ReconstructedDistributionFromSigmaPoints
 
class  SigmaPointCorrectionApplication
 
struct  SigmaPointParameterDerivedQuantities
 
struct  SigmaPointParameters
 For further details on the scaling factors, refer to: Julier, S. More...
 

Typedefs

template<typename ModelA , typename ModelB >
using DeducedAugmentedProcessModel = AugmentedProcessModel< typename std::remove_const< ModelA >::type, typename std::remove_const< ModelB >::type >
 Template alias to make removing const from the deduced types less verbose/painful. More...
 
template<typename StateA , typename StateB >
using DeducedAugmentedState = AugmentedState< typename std::remove_const< StateA >::type, typename std::remove_const< StateB >::type >
 Template alias to make removing const from the deduced types less verbose/painful. More...
 
template<std::size_t Dim>
using SigmaPointGenerator = AugmentedSigmaPointGenerator< Dim, Dim >
 

Functions

template<typename ModelA , typename ModelB >
DeducedAugmentedProcessModel< ModelA, ModelB > makeAugmentedProcessModel (ModelA &a, ModelB &b)
 Factory function, akin to std::tie(), to make an augmented process model. More...
 
template<typename StateA , typename StateB >
DeducedAugmentedState< StateA, StateB > makeAugmentedState (StateA &a, StateB &b)
 Factory function, akin to std::tie(), to make an augmented state.
 
template<typename StateType , typename ProcessModelType >
types::DimSquareMatrix< StateType > predictErrorCovariance (StateType const &state, ProcessModelType &processModel, double dt)
 Computes P-. More...
 
template<typename StateType , typename ProcessModelType , typename MeasurementType >
CorrectionInProgress< StateType, MeasurementType > beginCorrection (StateType &state, ProcessModelType &processModel, MeasurementType &meas)
 
template<typename StateType , typename ProcessModelType >
void predict (StateType &state, ProcessModelType &processModel, double dt)
 
template<typename StateType , typename ProcessModelType , typename MeasurementType >
bool correct (StateType &state, ProcessModelType &processModel, MeasurementType &meas, bool cancelIfNotFinite=true)
 
template<typename Derived >
Eigen::Matrix3d makeSkewSymmetrixCrossProductMatrix (Eigen::MatrixBase< Derived > const &v)
 Produces the "hat matrix" that produces the same result as performing a cross-product with v. More...
 
template<typename State , typename Measurement >
SigmaPointCorrectionApplication< State, Measurement > beginUnscentedCorrection (State &s, Measurement &m, SigmaPointParameters const &params=SigmaPointParameters())
 
double computeNu (std::size_t L, double alpha)
 

Detailed Description

Header-only framework for building Kalman-style filters, prediction, and sensor fusion.

Typedef Documentation

§ DeducedAugmentedProcessModel

template<typename ModelA , typename ModelB >
using osvr::kalman::DeducedAugmentedProcessModel = typedef AugmentedProcessModel<typename std::remove_const<ModelA>::type, typename std::remove_const<ModelB>::type>

Template alias to make removing const from the deduced types less verbose/painful.

§ DeducedAugmentedState

template<typename StateA , typename StateB >
using osvr::kalman::DeducedAugmentedState = typedef AugmentedState<typename std::remove_const<StateA>::type, typename std::remove_const<StateB>::type>

Template alias to make removing const from the deduced types less verbose/painful.

Function Documentation

§ beginCorrection()

template<typename StateType , typename ProcessModelType , typename MeasurementType >
CorrectionInProgress<StateType, MeasurementType> osvr::kalman::beginCorrection ( StateType &  state,
ProcessModelType &  processModel,
MeasurementType &  meas 
)
inline

Dimension of measurement

Dimension of state

Measurement Jacobian

Measurement covariance

State error covariance

The kalman gain stuff to not invert (called P12 in TAG)

the stuff to invert for the kalman gain also sometimes called S or the "Innovation Covariance"

More computation is done in initializers/constructor

§ correct()

template<typename StateType , typename ProcessModelType , typename MeasurementType >
bool osvr::kalman::correct ( StateType &  state,
ProcessModelType &  processModel,
MeasurementType &  meas,
bool  cancelIfNotFinite = true 
)
inline
Parameters
cancelIfNotFiniteIf the state correction or new error covariance is detected to contain non-finite values, should we cancel the correction and not apply it?
Returns
true if correction completed

§ makeAugmentedProcessModel()

template<typename ModelA , typename ModelB >
DeducedAugmentedProcessModel<ModelA, ModelB> osvr::kalman::makeAugmentedProcessModel ( ModelA &  a,
ModelB &  b 
)
inline

Factory function, akin to std::tie(), to make an augmented process model.

§ makeSkewSymmetrixCrossProductMatrix()

template<typename Derived >
Eigen::Matrix3d osvr::kalman::makeSkewSymmetrixCrossProductMatrix ( Eigen::MatrixBase< Derived > const &  v)
inline

Produces the "hat matrix" that produces the same result as performing a cross-product with v.

This is the same as the "capital omega" skew-symmetrix matrix used by a matrix-exponential-map rotation vector.

Parameters
va 3D vector
Returns
a matrix M such that for some 3D vector u, Mu = v x u.

§ predictErrorCovariance()

template<typename StateType , typename ProcessModelType >
types::DimSquareMatrix<StateType> osvr::kalman::predictErrorCovariance ( StateType const &  state,
ProcessModelType &  processModel,
double  dt 
)
inline

Computes P-.

Usage is optional, most likely called from the process model updateState()` method.

Todo:
Determine if the fact that Q is (at least in one case) symmetrical implies anything else useful performance-wise here or later in the data flow.