Initializer for visual-inertial system. More...
#include <InertialInitializer.h>
Public Member Functions | |
void | feed_imu (const ov_core::ImuData &message, double oldest_time=-1) |
Feed function for inertial data. More... | |
InertialInitializer (InertialInitializerOptions ¶ms_, std::shared_ptr< ov_core::FeatureDatabase > db) | |
Default constructor. More... | |
bool | initialize (double ×tamp, 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. More... | |
Protected 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... | |
std::shared_ptr< DynamicInitializer > | init_dynamic |
Dynamic initialization helper class. More... | |
std::shared_ptr< StaticInitializer > | init_static |
Static initialization helper class. More... | |
InertialInitializerOptions | params |
Initialization parameters. More... | |
Initializer for visual-inertial system.
This will try to do both dynamic and state initialization of the state. The user can request to wait for a jump in our IMU readings (i.e. device is picked up) or to initialize as soon as possible. For state initialization, the user needs to specify the calibration beforehand, otherwise dynamic is always used. The logic is as follows:
The dynamic system is based on an implementation and extension of the work Estimator initialization in vision-aided inertial navigation with unknown camera-IMU calibration [Dong2012IROS] which solves the initialization problem by first creating a linear system for recovering the camera to IMU rotation, then for velocity, gravity, and feature positions, and finally a full optimization to allow for covariance recovery. Another paper which might be of interest to the reader is An Analytical Solution to the IMU Initialization Problem for Visual-Inertial Systems which has some detailed experiments on scale recovery and the accelerometer bias.
Definition at line 60 of file InertialInitializer.h.
|
explicit |
Default constructor.
params_ | Parameters loaded from either ROS or CMDLINE |
db | Feature tracker database with all features in it |
Definition at line 38 of file InertialInitializer.cpp.
void InertialInitializer::feed_imu | ( | const ov_core::ImuData & | message, |
double | oldest_time = -1 |
||
) |
Feed function for inertial data.
message | Contains our timestamp and inertial information |
oldest_time | Time that we can discard measurements before |
Definition at line 49 of file InertialInitializer.cpp.
bool InertialInitializer::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.
@m_class{m-note m-warning}
[out] | timestamp | Timestamp we have initialized the state at |
[out] | covariance | Calculated covariance of the returned state |
[out] | order | Order of the covariance matrix |
[out] | t_imu | Our imu type (need to have correct ids) |
wait_for_jerk | If true we will wait for a "jerk" |
Definition at line 73 of file InertialInitializer.cpp.
|
protected |
Feature tracker database with all features in it.
Definition at line 105 of file InertialInitializer.h.
|
protected |
Our history of IMU messages (time, angular, linear)
Definition at line 108 of file InertialInitializer.h.
|
protected |
Dynamic initialization helper class.
Definition at line 114 of file InertialInitializer.h.
|
protected |
Static initialization helper class.
Definition at line 111 of file InertialInitializer.h.
|
protected |
Initialization parameters.
Definition at line 102 of file InertialInitializer.h.