ethzasl-msf - Modular Sensor Fusion
Time delay compensated single and multi sensor fusion framework based on an EKF
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
eigen_utils.h File Reference
#include <Eigen/Dense>
#include <Eigen/Geometry>
#include <iostream>

Go to the source code of this file.

Functions

template<class Derived >
Eigen::Matrix< typename
Derived::Scalar, 3, 3 > 
skew (const Eigen::MatrixBase< Derived > &vec)
 Returns the 3D cross product skew symmetric matrix of a given 3D vector.
template<class Derived >
Eigen::Matrix< typename
Derived::Scalar, 4, 4 > 
omegaMatJPL (const Eigen::MatrixBase< Derived > &vec)
 Returns a matrix with angular velocities used for quaternion derivatives/.
template<class Derived >
Eigen::Matrix< typename
Derived::Scalar, 4, 4 > 
omegaMatHamilton (const Eigen::MatrixBase< Derived > &vec)
 Returns a matrix with angular velocities used for quaternion derivatives/.
template<class Derived >
Eigen::Matrix< typename
Derived::Scalar, 4, 3 > 
xiMat (const Eigen::MatrixBase< Derived > &q_vec)
 Returns a matrix to compute error quaternions.
template<class Derived >
Eigen::Quaternion< typename
Derived::Scalar > 
quaternionFromSmallAngle (const Eigen::MatrixBase< Derived > &theta)
 Computes a quaternion from the 3-element small angle approximation theta.
template<class D >
bool checkForNumeric (const Eigen::MatrixBase< D > &mat, const std::string &info)
 Debug output to check misbehavior of Eigen.

Function Documentation

template<class D >
bool checkForNumeric ( const Eigen::MatrixBase< D > &  mat,
const std::string &  info 
)
template<class Derived >
Eigen::Matrix<typename Derived::Scalar, 4, 4> omegaMatHamilton ( const Eigen::MatrixBase< Derived > &  vec)
inline

The quaternion to be multiplied with this matrix has to be in the order x y z w !!!

Parameters
vec3D vector with angular velocities
Returns
4x4 Matrix for multiplication with the quaternion
template<class Derived >
Eigen::Matrix<typename Derived::Scalar, 4, 4> omegaMatJPL ( const Eigen::MatrixBase< Derived > &  vec)
inline

The quaternion to be multiplied with this matrix has to be in the order x y z w !!!

Parameters
vec3D vector with angular velocities.
Returns
4x4 matrix for multiplication with the quaternion.
template<class Derived >
Eigen::Quaternion<typename Derived::Scalar> quaternionFromSmallAngle ( const Eigen::MatrixBase< Derived > &  theta)
template<class Derived >
Eigen::Matrix<typename Derived::Scalar, 3, 3> skew ( const Eigen::MatrixBase< Derived > &  vec)
inline
template<class Derived >
Eigen::Matrix<typename Derived::Scalar, 4, 3> xiMat ( const Eigen::MatrixBase< Derived > &  q_vec)
inline
Parameters
q_vec4D vector containing the quaternion's coefficients in the order x y z w.
Returns
4x3 matrix for error quaternion computation
Xi = [ w*I + skew([x y z])]  ; dq = [ Xi q]^T * q
[     -[x y z]       ]