Public Member Functions | Private Attributes | List of all members
ov_init::StaticInitializer Class Reference

Initializer for a static visual-inertial system. More...

#include <StaticInitializer.h>

Public Member Functions

bool initialize (double &timestamp, Eigen::MatrixXd &covariance, std::vector< std::shared_ptr< ov_type::Type >> &order, std::shared_ptr< ov_type::IMU > t_imu, bool wait_for_jerk=true)
 Try to get the initialized system using just the imu. More...
 
 StaticInitializer (InertialInitializerOptions &params_, std::shared_ptr< ov_core::FeatureDatabase > db, std::shared_ptr< std::vector< ov_core::ImuData >> imu_data_)
 Default constructor. More...
 

Private Attributes

std::shared_ptr< ov_core::FeatureDatabase_db
 Feature tracker database with all features in it. More...
 
std::shared_ptr< std::vector< ov_core::ImuData > > imu_data
 Our history of IMU messages (time, angular, linear) More...
 
InertialInitializerOptions params
 Initialization parameters. More...
 

Detailed Description

Initializer for a static visual-inertial system.

This implementation that assumes that the imu starts from standing still. To initialize from standstill:

  1. Collect all inertial measurements
  2. See if within the last window there was a jump in acceleration
  3. If the jump is past our threshold we should init (i.e. we have started moving)
  4. Use the previous window, which should have been stationary to initialize orientation
  5. Return a roll and pitch aligned with gravity and biases.

Definition at line 50 of file StaticInitializer.h.

Constructor & Destructor Documentation

◆ StaticInitializer()

ov_init::StaticInitializer::StaticInitializer ( InertialInitializerOptions params_,
std::shared_ptr< ov_core::FeatureDatabase db,
std::shared_ptr< std::vector< ov_core::ImuData >>  imu_data_ 
)
inlineexplicit

Default constructor.

Parameters
params_Parameters loaded from either ROS or CMDLINE
dbFeature tracker database with all features in it
imu_data_Shared pointer to our IMU vector of historical information

Definition at line 59 of file StaticInitializer.h.

Member Function Documentation

◆ initialize()

bool StaticInitializer::initialize ( double &  timestamp,
Eigen::MatrixXd &  covariance,
std::vector< std::shared_ptr< ov_type::Type >> &  order,
std::shared_ptr< ov_type::IMU t_imu,
bool  wait_for_jerk = true 
)

Try to get the initialized system using just the imu.

This will check if we have had a large enough jump in our acceleration. If we have then we will use the period of time before this jump to initialize the state. This assumes that our imu is sitting still and is not moving (so this would fail if we are experiencing constant acceleration).

In the case that we do not wait for a jump (i.e. wait_for_jerk is false), then the system will try to initialize as soon as possible. This is only recommended if you have zero velocity update enabled to handle the stationary cases. To initialize in this case, we need to have the average angular variance be below the set threshold (i.e. we need to be stationary).

Parameters
[out]timestampTimestamp we have initialized the state at
[out]covarianceCalculated covariance of the returned state
[out]orderOrder of the covariance matrix
[out]t_imuOur imu type element
wait_for_jerkIf true we will wait for a "jerk"
Returns
True if we have successfully initialized our system

Definition at line 37 of file StaticInitializer.cpp.

Member Data Documentation

◆ _db

std::shared_ptr<ov_core::FeatureDatabase> ov_init::StaticInitializer::_db
private

Feature tracker database with all features in it.

Definition at line 89 of file StaticInitializer.h.

◆ imu_data

std::shared_ptr<std::vector<ov_core::ImuData> > ov_init::StaticInitializer::imu_data
private

Our history of IMU messages (time, angular, linear)

Definition at line 92 of file StaticInitializer.h.

◆ params

InertialInitializerOptions ov_init::StaticInitializer::params
private

Initialization parameters.

Definition at line 86 of file StaticInitializer.h.


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


ov_init
Author(s): Patrick Geneva , Kevin Eckenhoff , Guoquan Huang
autogenerated on Mon Dec 16 2024 03:06:51