Initializer for a static visual-inertial system. More...
#include <StaticInitializer.h>
Public Member Functions | |
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 using just the imu. More... | |
StaticInitializer (InertialInitializerOptions ¶ms_, 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... | |
Initializer for a static visual-inertial system.
This implementation that assumes that the imu starts from standing still. To initialize from standstill:
Definition at line 50 of file StaticInitializer.h.
|
inlineexplicit |
Default constructor.
params_ | Parameters loaded from either ROS or CMDLINE |
db | Feature 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.
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).
[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 element |
wait_for_jerk | If true we will wait for a "jerk" |
Definition at line 37 of file StaticInitializer.cpp.
|
private |
Feature tracker database with all features in it.
Definition at line 89 of file StaticInitializer.h.
|
private |
Our history of IMU messages (time, angular, linear)
Definition at line 92 of file StaticInitializer.h.
|
private |
Initialization parameters.
Definition at line 86 of file StaticInitializer.h.