ov_msckf::UpdaterSLAM class

Will compute the system for our sparse SLAM features and update the filter.

This class is responsible for performing delayed feature initialization, SLAM update, and SLAM anchor change for anchored feature representations.

Constructors, destructors, conversion operators

UpdaterSLAM(UpdaterOptions& options_slam, UpdaterOptions& options_aruco, ov_core::FeatureInitializerOptions& feat_init_options)
Default constructor for our SLAM updater.

Public functions

void update(std::shared_ptr<State> state, std::vector<std::shared_ptr<ov_core::Feature>>& feature_vec)
Given tracked SLAM features, this will try to use them to update the state.
void delayed_init(std::shared_ptr<State> state, std::vector<std::shared_ptr<ov_core::Feature>>& feature_vec)
Given max track features, this will try to use them to initialize them in the state.
void change_anchors(std::shared_ptr<State> state)
Will change SLAM feature anchors if it will be marginalized.

Protected functions

void perform_anchor_change(std::shared_ptr<State> state, std::shared_ptr<ov_type::Landmark> landmark, double new_anchor_timestamp, size_t new_cam_id)
Shifts landmark anchor to new clone.

Protected variables

UpdaterOptions _options_slam
Options used during update for slam features.
UpdaterOptions _options_aruco
Options used during update for aruco features.
std::shared_ptr<ov_core::FeatureInitializer> initializer_feat
Feature initializer class object.
std::map<int, double> chi_squared_table
Chi squared 95th percentile table (lookup would be size of residual)

Function documentation

ov_msckf::UpdaterSLAM::UpdaterSLAM(UpdaterOptions& options_slam, UpdaterOptions& options_aruco, ov_core::FeatureInitializerOptions& feat_init_options)

Default constructor for our SLAM updater.

Parameters
options_slam Updater options (include measurement noise value) for SLAM features
options_aruco Updater options (include measurement noise value) for ARUCO features
feat_init_options Feature initializer options

Our updater has a feature initializer which we use to initialize features as needed. Also the options allow for one to tune the different parameters for update.

void ov_msckf::UpdaterSLAM::update(std::shared_ptr<State> state, std::vector<std::shared_ptr<ov_core::Feature>>& feature_vec)

Given tracked SLAM features, this will try to use them to update the state.

Parameters
state State of the filter
feature_vec Features that can be used for update

void ov_msckf::UpdaterSLAM::delayed_init(std::shared_ptr<State> state, std::vector<std::shared_ptr<ov_core::Feature>>& feature_vec)

Given max track features, this will try to use them to initialize them in the state.

Parameters
state State of the filter
feature_vec Features that can be used for update

void ov_msckf::UpdaterSLAM::change_anchors(std::shared_ptr<State> state)

Will change SLAM feature anchors if it will be marginalized.

Parameters
state State of the filter

Makes sure that if any clone is about to be marginalized, it changes anchor representation. By default, this will shift the anchor into the newest IMU clone and keep the camera calibration anchor the same.

void ov_msckf::UpdaterSLAM::perform_anchor_change(std::shared_ptr<State> state, std::shared_ptr<ov_type::Landmark> landmark, double new_anchor_timestamp, size_t new_cam_id) protected

Shifts landmark anchor to new clone.

Parameters
state State of filter
landmark landmark whose anchor is being shifter
new_anchor_timestamp Clone timestamp we want to move to
new_cam_id Which camera frame we want to move to