ekf_cal
0.4.0
A Kalman filter-based sensor calibration package
|
Calibration EKF class. More...
#include <ekf.hpp>
Classes | |
struct | Parameters |
EKF class parameters. More... | |
Public Types | |
typedef struct EKF::Parameters | Parameters |
EKF class parameters. | |
Public Member Functions | |
EKF (Parameters params) | |
EKF class constructor. More... | |
unsigned int | GetStateSize () const |
Getter for state size. More... | |
ImuState | GetImuState (unsigned int imu_id) |
Get IMU sensor state. More... | |
GpsState | GetGpsState (unsigned int gps_id) |
Get GPS sensor state. More... | |
CamState | GetCamState (unsigned int cam_id) |
Get camera sensor state. More... | |
unsigned int | GetImuCount () const |
IMU count getter method. More... | |
unsigned int | GetImuStateSize () const |
IMU state size getter method. More... | |
unsigned int | GetGpsCount () const |
IMU count getter method. More... | |
unsigned int | GetGpsStateSize () const |
GPS state size getter method. More... | |
unsigned int | GetCamStateSize () const |
Camera state size getter method. More... | |
unsigned int | GetCamCount () const |
Camera count getter method. More... | |
void | LogBodyStateIfNeeded (int execution_count) |
Check if body data should be logged and do so if necessary. More... | |
void | PredictModel (double local_time) |
Predict state to given time using IMU measurements. More... | |
void | Initialize (double initial_time, const BodyState &body_state_init) |
EKF state initialization method. More... | |
void | RegisterIMU (unsigned int imu_id, const ImuState &imu_state, const Eigen::MatrixXd &covariance) |
IMU Registration function. More... | |
void | RegisterGPS (unsigned int gps_id, const GpsState &gps_state, const Eigen::Matrix3d &covariance) |
GPS Registration function. More... | |
void | RegisterCamera (unsigned int cam_id, const CamState &cam_state, const Eigen::MatrixXd &covariance) |
Camera Registration function. More... | |
void | RegisterFiducial (const FidState &fid_state, const Eigen::MatrixXd &covariance) |
Fiducial Registration function. More... | |
Eigen::MatrixXd | AugmentCovariance (const Eigen::MatrixXd &in_cov, unsigned int index) const |
Augment the state covariance matrix. More... | |
void | AugmentStateIfNeeded () |
Check if state should be augmented using current state. | |
void | AugmentStateIfNeeded (unsigned int camera_id, unsigned int frame_id) |
Check if state should be augmented using camera frame. More... | |
void | SetMaxTrackLength (unsigned int max_track_length) |
Setter for maximum track length. More... | |
void | SetBodyProcessNoise (const Eigen::VectorXd &process_noise) |
EKF process noise setter. More... | |
void | SetGpsReference (const Eigen::VectorXd &pos_e_in_g, double ang_l_to_e) |
GPS reference position setter. More... | |
void | SetZeroAcceleration (bool is_zero_acceleration) |
Zero acceleration flag setter. More... | |
Eigen::VectorXd | GetReferenceLLA () const |
Getter for the LLA reference position. More... | |
double | GetReferenceAngle () const |
Getter for the LLA reference frame heading. More... | |
bool | IsLlaInitialized () const |
Checks if the LLA reference frame has been initialized. More... | |
bool | IsGravityInitialized () const |
Checks if the gravity angle has been initialized. More... | |
void | InitializeGravity () |
Function to initialize gravity angle. | |
AugState | GetAugState (unsigned int camera_id, unsigned int frame_id, double time) |
Find or interpolate augmented state. More... | |
unsigned int | GetAugStateSize () const |
Get augmented state size. More... | |
void | RefreshIndices () |
Refresh the sub-state indices. | |
void | AttemptGpsInitialization (double time, const Eigen::Vector3d &gps_lla) |
GPS LLA to ENU Initialization Routine. More... | |
std::vector< double > | GetGpsTimeVector () const |
GPS time vector getter. More... | |
std::vector< Eigen::Vector3d > | GetGpsEcefVector () const |
GPS ECEF vector getter. More... | |
std::vector< Eigen::Vector3d > | GetGpsXyzVector () const |
GPS XYZ vector getter. More... | |
double | GetCurrentTime () const |
Current time getter. More... | |
unsigned int | GetImuStateStart () const |
IMU state start getter. More... | |
unsigned int | GetGpsStateStart () const |
GPS state start getter. More... | |
unsigned int | GetCamStateStart () const |
Camera state start getter. More... | |
unsigned int | GetAugStateStart () const |
Augmented states start getter. More... | |
unsigned int | GetFidStateStart () const |
Fiducial state start getter. More... | |
double | GetMotionDetectionChiSquared () const |
Motion detection Chi squared threshold getter. More... | |
double | GetImuNoiseScaleFactor () const |
IMU noise scale factor getter. More... | |
bool | GetUseRootCovariance () const |
Getter for use root covariance flag. More... | |
bool | GetUseFirstEstimateJacobian () const |
Getter for use first estimate Jacobians. More... | |
double | CalculateLocalTime (double time) |
Calculate UTF time to local EKF time. More... | |
Static Public Member Functions | |
static Eigen::MatrixXd | GetStateTransition (double delta_time) |
State transition matrix getter method. More... | |
Public Attributes | |
State | m_state |
EKF state. | |
Eigen::MatrixXd | m_cov = Eigen::MatrixXd::Identity(g_body_state_size, g_body_state_size) * 1e-2 |
EKF covariance. | |
Calibration EKF class.
Implement check for correlation coefficients to be between +/- 1
Add gravity initialization/check
Create generic function to update(r,H,R)
|
explicit |
void EKF::AttemptGpsInitialization | ( | double | time, |
const Eigen::Vector3d & | gps_lla | ||
) |
Eigen::MatrixXd EKF::AugmentCovariance | ( | const Eigen::MatrixXd & | in_cov, |
unsigned int | index | ||
) | const |
Augment the state covariance matrix.
in_cov | Original state covariance matrix |
index | Augmented state start index |
void EKF::AugmentStateIfNeeded | ( | unsigned int | camera_id, |
unsigned int | frame_id | ||
) |
Check if state should be augmented using camera frame.
camera_id | Current camera ID |
frame_id | Current frame ID |
AugState EKF::GetAugState | ( | unsigned int | camera_id, |
unsigned int | frame_id, | ||
double | time | ||
) |
Find or interpolate augmented state.
camera_id | Desired camera ID |
frame_id | Desired frame ID |
time | Frame time |
unsigned int EKF::GetAugStateSize | ( | ) | const |
Get augmented state size.
unsigned int EKF::GetAugStateStart | ( | ) | const |
Augmented states start getter.
CamState EKF::GetCamState | ( | unsigned int | cam_id | ) |
unsigned int EKF::GetCamStateSize | ( | ) | const |
double EKF::GetCurrentTime | ( | ) | const |
Current time getter.
unsigned int EKF::GetFidStateStart | ( | ) | const |
Fiducial state start getter.
std::vector< Eigen::Vector3d > EKF::GetGpsEcefVector | ( | ) | const |
GpsState EKF::GetGpsState | ( | unsigned int | gps_id | ) |
std::vector< double > EKF::GetGpsTimeVector | ( | ) | const |
std::vector< Eigen::Vector3d > EKF::GetGpsXyzVector | ( | ) | const |
double EKF::GetImuNoiseScaleFactor | ( | ) | const |
ImuState EKF::GetImuState | ( | unsigned int | imu_id | ) |
double EKF::GetMotionDetectionChiSquared | ( | ) | const |
Motion detection Chi squared threshold getter.
double EKF::GetReferenceAngle | ( | ) | const |
Getter for the LLA reference frame heading.
Eigen::VectorXd EKF::GetReferenceLLA | ( | ) | const |
Getter for the LLA reference position.
unsigned int EKF::GetStateSize | ( | ) | const |
Getter for state size.
|
static |
bool EKF::GetUseFirstEstimateJacobian | ( | ) | const |
Getter for use first estimate Jacobians.
bool EKF::GetUseRootCovariance | ( | ) | const |
Getter for use root covariance flag.
void EKF::Initialize | ( | double | initial_time, |
const BodyState & | body_state_init | ||
) |
EKF state initialization method.
initial_time | Initial time |
body_state_init | Initial state |
bool EKF::IsGravityInitialized | ( | ) | const |
Checks if the gravity angle has been initialized.
bool EKF::IsLlaInitialized | ( | ) | const |
Checks if the LLA reference frame has been initialized.
void EKF::LogBodyStateIfNeeded | ( | int | execution_count | ) |
Check if body data should be logged and do so if necessary.
execution_count |
void EKF::PredictModel | ( | double | local_time | ) |
void EKF::RegisterCamera | ( | unsigned int | cam_id, |
const CamState & | cam_state, | ||
const Eigen::MatrixXd & | covariance | ||
) |
void EKF::RegisterFiducial | ( | const FidState & | fid_state, |
const Eigen::MatrixXd & | covariance | ||
) |
Fiducial Registration function.
fid_state | Initial fiducial state |
covariance | Initial fiducial covariance |
void EKF::RegisterGPS | ( | unsigned int | gps_id, |
const GpsState & | gps_state, | ||
const Eigen::Matrix3d & | covariance | ||
) |
void EKF::RegisterIMU | ( | unsigned int | imu_id, |
const ImuState & | imu_state, | ||
const Eigen::MatrixXd & | covariance | ||
) |
void EKF::SetBodyProcessNoise | ( | const Eigen::VectorXd & | process_noise | ) |
EKF process noise setter.
process_noise | Diagonal terms of process noise |
void EKF::SetGpsReference | ( | const Eigen::VectorXd & | pos_e_in_g, |
double | ang_l_to_e | ||
) |
void EKF::SetMaxTrackLength | ( | unsigned int | max_track_length | ) |
Setter for maximum track length.
max_track_length | maximum track length |
void EKF::SetZeroAcceleration | ( | bool | is_zero_acceleration | ) |
Zero acceleration flag setter.
is_zero_acceleration | Body has zero acceleration flag |